Provides media content information.
| abstract float |
getAspectRatio()
Returns the aspect ratio of the media content.
|
| abstract float |
getCurrentTime()
Get the current time of the video in seconds.
|
| abstract float |
getDuration()
Returns the duration of the video in seconds.
|
| abstract Drawable |
getMainImage()
Returns the main image to be displayed if the media content doesn't contain
video.
|
| abstract VideoController |
getVideoController()
Returns the media content's video controller.
|
| abstract boolean |
hasVideoContent()
Indicates whether the media content has video content.
|
| abstract void |
setMainImage(Drawable
drawable)
Sets the optional main image to be displayed if the media content doesn't
contain video.
|
Returns the aspect ratio of the media content.
Returns the aspect ratio of the video if hasVideoContent()
is true.
Returns the aspect ratio of the main image if hasVideoContent()
is false.
Get the current time of the video in seconds. Returns 0 if the media content does not contain video.
Returns the duration of the video in seconds. Returns 0 if media content does not contain video.
Returns the main image to be displayed if the media content doesn't contain video.
The API is for native ads only.
Returns the media content's video controller.
Indicates whether the media content has video content.
Sets the optional main image to be displayed if the media content doesn't contain video.
The API is for native ads only. Use this method if you set
shouldReturnUrlsForImageAssets() when loading native ads.