Package com.theoplayer.android.api.ads
Interface CompanionAd
-
- All Implemented Interfaces:
public interface CompanionAdThe CompanionAd API represents a companion ad which is displayed besides the player.
- A CompanionAd is included in a LinearAd or a NonLinearAd.
-
-
Method Summary
Modifier and Type Method Description abstract StringgetAdSlotId()An identifier of the element in which the companion ad should be appended, if available. abstract StringgetAltText()An alternative description for ad. abstract StringgetClickThrough()The website of the advertisement. abstract intgetHeight()The height of the companion ad. abstract StringgetResourceURI()The URI of the ad content. abstract intgetWidth()The width of the companion ad. abstract StringgetType()The type of the companion ad. -
-
Method Detail
-
getAdSlotId
@NonNull() abstract String getAdSlotId()
An identifier of the element in which the companion ad should be appended, if available.
Default: Empty String.
- Returns:
The identifier of the element. (NonNull)
-
getAltText
@NonNull() abstract String getAltText()
An alternative description for ad.
- Only supported for StaticResource.
- Returns:
The alternative description. (NonNull)
-
getClickThrough
@NonNull() abstract String getClickThrough()
The website of the advertisement.
- Only supported for StaticResource.
- Returns:
The url of the advertisement. (NonNull)
-
getHeight
abstract int getHeight()
The height of the companion ad.
- Returns:
The height, in pixels.
-
getResourceURI
@NonNull() abstract String getResourceURI()
The URI of the ad content.
- Returns:
The ad content URI. (NonNull)
-
getWidth
abstract int getWidth()
The width of the companion ad.
- Returns:
The width, in pixels.
-
-
-
-