Class AdAsset

java.lang.Object
com.brightcove.player.ads.AdAsset

public final class AdAsset extends Object
An AdAsset contains the information needed to play an Ad.
  • Constructor Details

    • AdAsset

      public AdAsset(@NonNull String adId, @NonNull String adTitle, @NonNull String url, @NonNull DeliveryType deliveryType, @NonNull AdAsset.AdType adType, boolean isSkippable, long skipOffset, int adNumber, int totalAdsInAdBreak)
      Constructor of an AdId.
      Parameters:
      adId - the ad Id.
      adTitle - the ad title.
      url - the ad url.
      deliveryType - the ad DeliveryType.
      adType - the ad AdAsset.AdType.
      isSkippable - whether the ad can be skipped.
      skipOffset - the ad skip offset. Indicates when the ad can be skipped.
      adNumber - the 1-indexed ad number in the ad break.
      totalAdsInAdBreak - the number of ads in the ad break.
  • Method Details

    • getAdId

      @NonNull public String getAdId()
      Returns:
      the ad Id.
    • getAdTitle

      @NonNull public String getAdTitle()
      Returns:
      the ad title.
    • getUrl

      @NonNull public String getUrl()
      Returns:
      the ad url.
    • getDeliveryType

      @NonNull public DeliveryType getDeliveryType()
      Returns:
      the ad DeliveryType.
    • getAdType

      @NonNull public AdAsset.AdType getAdType()
      Returns:
      the AdAsset.AdType.
    • isSkippable

      public boolean isSkippable()
      Returns:
      whether the ad can be skipped.
    • getSkipOffset

      public long getSkipOffset()
      Returns:
      the ad skip offset in milliseconds. Indicates when the ad can be skipped.
    • getAdNumber

      public int getAdNumber()
      Returns:
      the 1-indexed ad number in the ad break.
    • getTotalAdsInAdBreak

      public int getTotalAdsInAdBreak()
      Returns:
      the 1-indexed ad number in the ad break.
    • isFirstAdInAdBreak

      public boolean isFirstAdInAdBreak()
      Returns:
      whether this AdAsset represents the first ad of the Ad break
    • isLastAdInAdBreak

      public boolean isLastAdInAdBreak()
      Returns:
      whether this AdAsset represents the last ad in the Ad Break.