Package com.theoplayer.android.api.ads
Interface Ad
-
- All Implemented Interfaces:
public interface Ad
The Ad API represents a VAST creative. It is either a linear or non-linear ad.
-
-
Method Summary
Modifier and Type Method Description abstract String
getId()
The identifier of the creative, provided in the VAST-file. abstract List<CompanionAd>
getCompanions()
The List of CompanionAds associated to the ad, if available within the same Creatives element. abstract String
getType()
The type of the Ad. abstract AdBreak
getAdBreak()
A reference to the AdBreak of which the ad is a part of. abstract int
getSkipOffset()
The number of seconds after which the Ad can be skipped. abstract AdIntegrationKind
getIntegration()
The type of ad integration. -
-
Method Detail
-
getId
@NonNull() abstract String getId()
The identifier of the creative, provided in the VAST-file.
Default: Empty string.
- Returns:
The identifier. (NonNull)
-
getCompanions
@NonNull() abstract List<CompanionAd> getCompanions()
The List of CompanionAds associated to the ad, if available within the same Creatives element.
- Returns:
List of CompanionAds. (NonNull)
-
getType
@Nullable() abstract String getType()
The type of the Ad.
- It can be either 'linear' or 'nonlinear', depending on the concrete implementor.
- Returns:
The type of the Ad. (Nullable)
-
getAdBreak
@Nullable() abstract AdBreak getAdBreak()
A reference to the AdBreak of which the ad is a part of.
- Returns:
A reference to AdBreak. (Nullable)
-
getSkipOffset
abstract int getSkipOffset()
The number of seconds after which the Ad can be skipped.
- Only available when the ad is skippable.
- Only available for LinearAd.
Default: 0
- Returns:
This value of skip offset, in seconds.
-
getIntegration
@Nullable() abstract AdIntegrationKind getIntegration()
The type of ad integration.
- For all possibilities, see: AdIntegrationKind.
- Returns:
The ad integration type. (Nullable)
-
-
-
-