Class AdAsset


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

      • AdAsset

        public AdAsset​(@NonNull
                       java.lang.String adId,
                       @NonNull
                       java.lang.String adTitle,
                       @NonNull
                       java.lang.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 Detail

      • getAdId

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

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

        @NonNull
        public java.lang.String getUrl()
        Returns:
        the ad url.
      • 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.