public interface VideoPlayer
This interface is used to control content playback while playing ads

Method Summary

All Methods
Instance Methods
Abstract Methods
Modifier and TypeMethod and Description
longgetVideoDuration()
Gets content video duration
longgetVideoPosition()
Gets current content video position
floatgetVolume()
Gets current content video volume with 0 being silence and 1 being maximum volume level
voidpauseVideo()
Pauses playing content video
voidprepareVideo()
Prepares content video
voidresumeVideo()
Resumes playing content video
voidsetVideoPlayerListener(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