Listener

interface Listener

Callbacks that the player must fire.

Functions

Link copied to clipboard
abstract fun onBuffering()

Fire this callback when the buffering has started

Link copied to clipboard
abstract fun onBufferingFinished()

Fire this callback when the buffering has finished

Link copied to clipboard
abstract fun onEnded()

Fire this callback when the player has finished playing

Link copied to clipboard
abstract fun onError(error: String)

Fire this callback on error

Link copied to clipboard
abstract fun onLoading(index: Int?)
Link copied to clipboard
abstract fun onLoadingFinished(index: Int?)
Link copied to clipboard
open fun onMetadata(metadataList: List<AdPlayer.MetadataItem>)

Fire this callback when metadata is received in streaming It is fired only on server side insertion

Link copied to clipboard
abstract fun onPause()

Fire this callback when the player has paused

Link copied to clipboard
abstract fun onPlay()

Fire this callback when the play starts

Link copied to clipboard
abstract fun onResume()

Fire this callback when the player resumed

Link copied to clipboard
abstract fun onSeekToTrackEnd(currentTrackIndex: Int)
Link copied to clipboard
open fun onSkipAd(error: Error)

Fire this when you want to skip with an error this function will not fire skip tracking but error tracking with vast code 400

Link copied to clipboard
open fun onTrackChanged(newTrackIndex: Int)

On track changed.

Link copied to clipboard
open fun onVideoSizeChanged(player: AdPlayer, width: Int, height: Int)

Called when video size changes and also when it starts with the initial values

Link copied to clipboard
open fun onVolumeChanged(volume: Float)

Fire this callback when player volume has changed