Package com.theoplayer.android.api.ads
Interface CompanionAd
-
- All Implemented Interfaces:
public interface CompanionAd
The 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 String
getAdSlotId()
An identifier of the element in which the companion ad should be appended, if available. abstract String
getAltText()
An alternative description for ad. abstract String
getClickThrough()
The website of the advertisement. abstract int
getHeight()
The height of the companion ad. abstract String
getResourceURI()
The URI of the ad content. abstract int
getWidth()
The width of the companion ad. abstract String
getType()
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.
-
-
-
-