Interface VideoPlayer
-
public interface VideoPlayerThis interface is used to control content playback while playing ads
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetVideoDuration()Gets content video durationlonggetVideoPosition()Gets current content video positionfloatgetVolume()Gets current content video volume with 0 being silence and 1 being maximum volume levelvoidpauseVideo()Pauses playing content videovoidprepareVideo()Prepares content videovoidresumeVideo()Resumes playing content videovoidsetVideoPlayerListener(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
-
-