Class AdInsight.Builder

java.lang.Object
com.brightcove.player.analytics.insights.AdInsight.Builder
Enclosing class:
AdInsight

public static class AdInsight.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setEventName

      public AdInsight.Builder setEventName(String eventName)
      Sets ad insight event name.
      Parameters:
      eventName - - Ad insight event name.
      Returns:
      Event name builder.
    • setAdsPodIndex

      public AdInsight.Builder setAdsPodIndex(Integer adsPodIndex)
      The index of the pod relative to the content. Resets to zero with each change in content.
      Parameters:
      adsPodIndex - - The index of the pod relative to the content.
      Returns:
      Ads ad pod index builder.
    • setAdsAdIndex

      public AdInsight.Builder setAdsAdIndex(Integer adsAdIndex)
      The position of the ad relative to the pod. Resets to one with each new ad pod. 0-n.
      Parameters:
      adsAdIndex - - The index of the ad relative to the pod.
      Returns:
      - Ads ad index builder.
    • setAdsAdDealId

      public AdInsight.Builder setAdsAdDealId(String adsAdDealId)
      The first deal ID present in the wrapper chain for the current ad, starting from the top. Exclude if not available.
      Parameters:
      adsAdDealId - - The first deal ID present in the wrapper chain for the current ad, starting from the top.
      Returns:
      - Ads ad deal id builder.
    • setAdsAdWrapperSystems

      public AdInsight.Builder setAdsAdWrapperSystems(String[] adsAdWrapperSystems)
      Comma-separated list of ad systems used for wrapper ads starting at the inline ad and traversing to the outermost wrapper ad. Exclude if not available.
      Parameters:
      adsAdWrapperSystems - - Comma-separated list of ad systems.
      Returns:
      - Ads ad wrapper systems builder.
    • setAdsAdSystem

      public AdInsight.Builder setAdsAdSystem(String adsAdSystem)
      Source ad server information included in the ad response. Exclude if not available.
      Parameters:
      adsAdSystem - - Source ad server information included in the ad response.
      Returns:
      - Ads ad system builder.
    • setAdsAdSkipTimeOffset

      public AdInsight.Builder setAdsAdSkipTimeOffset(Long adsAdSkipTimeOffset)
      Number of seconds of playback before the ad becomes skippable. Exclude for non-skippable ads.
      Parameters:
      adsAdSkipTimeOffset - - Number of seconds of playback before the ad becomes skippable.
      Returns:
      Ads ad skip time offset builder.
    • setAdsAdStartMs

      public AdInsight.Builder setAdsAdStartMs(Long adsAdStartMs)
      Milliseconds to start playing the first frame of the ad. Exclude if not available.
      Parameters:
      adsAdStartMs - - Milliseconds to start playing the first frame of the ad.
      Returns:
      Ads ad start in milliseconds.
    • setAdsAdAdvertiser

      public AdInsight.Builder setAdsAdAdvertiser(String adsAdAdvertiser)
      The advertiser name as defined by the serving party. Exclude if not available.
      Parameters:
      adsAdAdvertiser - - The advertiser name as defined by the serving party.
      Returns:
      - Ads ad advertiser builder.
    • setAdsAdContentType

      public AdInsight.Builder setAdsAdContentType(String adsAdContentType)
      The content type of the currently selected creative. Exclude if no creative is selected or the content type is unavailable.
      Parameters:
      adsAdContentType - - The content type of the currently selected creative.
      Returns:
      - Ads ad content type builder.
    • setAdsAdIsci

      public AdInsight.Builder setAdsAdIsci(String adsAdIsci)
      The ISCI (Industry Standard Commercial Identifier) code for an ad. Exclude if not available.
      Parameters:
      adsAdIsci - - The ISCI (Industry Standard Commercial Identifier) code for an ad.
      Returns:
      - Ads ad Industry Standard Commercial Identifier builder.
    • setAdsAdCreativeId

      public AdInsight.Builder setAdsAdCreativeId(String adsAdCreativeId)
      The ID of the selected creative for the ad.
      Parameters:
      adsAdCreativeId - The ID of the selected creative for the ad.
      Returns:
      Ads ad creative id builder.
    • setAdsAdDuration

      public AdInsight.Builder setAdsAdDuration(Double adsAdDuration)
      The duration in seconds of the selected creative for the ad. Exclude for non-linear ads.
      Parameters:
      adsAdDuration - - The duration in seconds of the selected creative for the ad.
      Returns:
      - Ads ad duration builder.
    • setAdsAdTitle

      public AdInsight.Builder setAdsAdTitle(String adsAdTitle)
      The title of the ad from the VAST response.
      Parameters:
      adsAdTitle - - The title of the ad from the VAST response.
      Returns:
      Ads ad title builder.
    • setAdsAdMediaUrlDomain

      public AdInsight.Builder setAdsAdMediaUrlDomain(String adsAdMediaUrlDomain)
      The hostname parsed from the ad media file.
      Parameters:
      adsAdMediaUrlDomain - - The hostname parsed from the ad media file.
      Returns:
      - Ads ad media url domain builder.
    • setAdsPodAdCount

      public AdInsight.Builder setAdsPodAdCount(Integer adsPodAdCount)
      Number of ads in the current pod.
      Parameters:
      adsPodAdCount - - Number of ads in the current pod.
      Returns:
      - Ads pod ads count builder.
    • setAdsPodDuration

      public AdInsight.Builder setAdsPodDuration(Double adsPodDuration)
      The total number of seconds the ad pod is expected to run.
      Parameters:
      adsPodDuration - - The total number of seconds the ad pod is expected to run.
      Returns:
      - Ads pod duration builder.
    • setAdsPodHost

      public AdInsight.Builder setAdsPodHost(String adsPodHost)
      Host name from the ad server URL called to return the ad pod.

      For CSAI, this is an arbitrary string. For SSAI, this is an enum of either “ssai” or “dai”

      Parameters:
      adsPodHost - - Host name from the ad server URL called to return the ad pod.
      Returns:
      - Ads pod host builder.
    • setAdPodType

      public AdInsight.Builder setAdPodType(AdInsight.AdPodType getAdPodType)
      pre = preroll: the ad pod played before content mid = midroll: the ad pod played during content post = postroll: the ad pod played after content
      Parameters:
      getAdPodType - - Ad pod type.
      Returns:
      - Ad pod type builder.
    • setAdsPodRequestMs

      public AdInsight.Builder setAdsPodRequestMs(Long adsPodRequestMs)
      Milliseconds from ad request sent to ad request received.
      Parameters:
      adsPodRequestMs - - Milliseconds from ad request sent to ad request received.
      Returns:
      - Ads pod request in milliseconds.
    • setAdsPodRequestMode

      public AdInsight.Builder setAdsPodRequestMode(AdInsight.AdsPodRequestMode adsPodRequestMode)
      How ads were requested.

      onload = Ads requested when content began loading. onplay = Ads requested when content playback was requested. ondemand = Ads requested on-demand by the integrator. oncue = Ads requested on Video Cloud cue points.

      For SSAI, use onload.

      Parameters:
      adsPodRequestMode - - Pod request mode.
      Returns:
      - Ads pod request mode builder.
    • setAdsPodTimeOffset

      public AdInsight.Builder setAdsPodTimeOffset(Long adsPodTimeOffset)
      The content time offset at which the current ad pod was scheduled.

      For prerolls, use 0. For midrolls, will be the time offset specified either by the ad or the playhead position when ad playback begins. For postrolls, use the content duration

      Parameters:
      adsPodTimeOffset - -The content time offset at which the current ad pod was scheduled.
      Returns:
      - Ads pod time offset builder.
    • setAdsAdAudibleDuration

      public AdInsight.Builder setAdsAdAudibleDuration(Double adsAdAudibleDuration)
      Seconds of ad playback where volume was >= 1% and not muted.
      Parameters:
      adsAdAudibleDuration - - Seconds of ad playback where volume was >= 1% and not muted.
      Returns:
      - Ads ad audible duration builder.
    • setAdsAdPlayDuration

      public AdInsight.Builder setAdsAdPlayDuration(Double adsAdPlayDuration)
      Seconds of ad media played.
      Parameters:
      adsAdPlayDuration - - Seconds of ad media played.
      Returns:
      - Ads ad play duration builder.
    • setAdsAdSkipped

      public AdInsight.Builder setAdsAdSkipped(Boolean adsAdSkipped)
      1 if the ad was skipped, 0 otherwise.
      Parameters:
      adsAdSkipped - - 1 if the ad was skipped, 0 otherwise.
      Returns:
      - Ads ad skipped builder.
    • setAdsAdInteraction

      public AdInsight.Builder setAdsAdInteraction(Boolean adsAdInteraction)
      1 if the ad was clicked or tapped, 0 otherwise.
      Parameters:
      adsAdInteraction - - 1 if the ad was clicked or tapped, 0 otherwise.
      Returns:
      - Ads ad interaction builder.
    • build

      public AdInsight build()