AdVideoPlayer

interface AdVideoPlayer

Interface definition for controlling video playback.

Types

Link copied to clipboard
interface PlayerCallback
Interface for alerting caller of major video events.

Functions

Link copied to clipboard
Provide the player with a callback for major video events (pause, complete, resume, etc).
Link copied to clipboard
Prevent the media controller (playback controls) from appearing.
Link copied to clipboard
abstract fun enablePlaybackControls()
Allow the media controller (playback controls) to appear when appropriate.
Link copied to clipboard
abstract fun getBufferedTime(): Int
Link copied to clipboard
abstract fun getCurrentPosition(): Long
Get the playback progress state (milliseconds) of the current video.
Link copied to clipboard
abstract fun getDuration(): Long
Get the total length of the currently loaded video in milliseconds.
Link copied to clipboard
abstract fun getVolume(): Float
Link copied to clipboard
abstract fun pause()
Pause the currently loaded video.
Link copied to clipboard
abstract fun play()
Play the currently loaded video from its current position.
Link copied to clipboard
Remove a player callback from getting notified on video events.
Link copied to clipboard
abstract fun resume()
Resume the currently loaded video.
Link copied to clipboard
abstract fun seekTo(videoPosition: Long)
Progress the currently loaded video to the given position (milliseconds).
Link copied to clipboard
abstract fun setVideoPath(videoUrl: String)
Set the URL or path of the video to play.
Link copied to clipboard
abstract fun stopPlayback()
Stop playing the currently loaded video.