Package com.brightcove.player.ads
Class AdAsset
java.lang.Object
com.brightcove.player.ads.AdAsset
An AdAsset contains the information needed to play an Ad.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionAdAsset
(String adId, String adTitle, String url, DeliveryType deliveryType, AdAsset.AdType adType, boolean isSkippable, long skipOffset, int adNumber, int totalAdsInAdBreak) Constructor of an AdId. -
Method Summary
-
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 adDeliveryType
.adType
- the adAdAsset.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
- Returns:
- the ad Id.
-
getAdTitle
- Returns:
- the ad title.
-
getUrl
- Returns:
- the ad url.
-
getDeliveryType
- Returns:
- the ad
DeliveryType
.
-
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.
-