Package com.brightcove.player.ads
Class AdAsset
- java.lang.Object
-
- com.brightcove.player.ads.AdAsset
-
public final class AdAsset extends java.lang.Object
An AdAsset contains the information needed to play an Ad.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdAsset.AdType
The ad types
-
Constructor Summary
Constructors Constructor Description AdAsset(java.lang.String adId, java.lang.String adTitle, java.lang.String url, DeliveryType deliveryType, AdAsset.AdType adType, boolean isSkippable, long skipOffset, int adNumber, int totalAdsInAdBreak)
Constructor of an AdId.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAdId()
int
getAdNumber()
java.lang.String
getAdTitle()
AdAsset.AdType
getAdType()
DeliveryType
getDeliveryType()
long
getSkipOffset()
int
getTotalAdsInAdBreak()
java.lang.String
getUrl()
boolean
isFirstAdInAdBreak()
boolean
isLastAdInAdBreak()
boolean
isSkippable()
-
-
-
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 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 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.
-
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.
-
-