com.yandex.mobile.ads.instream.player.content
Interface VideoPlayer
public interface VideoPlayer
This interface is used to control content playback while playing ads
Method Summary
Modifier and Type | Method and Description |
---|---|
long | getVideoDuration()
Gets content video duration
|
long | getVideoPosition()
Gets current content video position
|
float | getVolume()
Gets current content video volume with 0 being silence and 1 being maximum volume level
|
void | pauseVideo()
Pauses playing content video
|
void | prepareVideo()
Prepares content video
|
void | resumeVideo()
Resumes playing content video
|
void | setVideoPlayerListener(VideoPlayerListener listener)
Sets listener for content player events.
|
Method Detail
getVolume
float getVolume()
Gets current content video volume with 0 being silence and 1 being maximum volume level
- Returns:
- volume level in range [0.0, 1.0]
getVideoPosition
long getVideoPosition()
Gets current content video position
- Returns:
- current content video position in millis
getVideoDuration
long getVideoDuration()
Gets content video duration
- Returns:
- content video duration
prepareVideo
void prepareVideo()
Prepares content video
pauseVideo
void pauseVideo()
Pauses playing content video
resumeVideo
void resumeVideo()
Resumes playing content video
setVideoPlayerListener
void setVideoPlayerListener(@Nullable VideoPlayerListener listener)
Sets listener for content player events. For each event of the content video player, the corresponding callback must be called on this object.
- Parameters:
listener
- Listener for content player events