VideoAdPlayer.VideoAdPlayerCallback

public interface VideoAdPlayer.VideoAdPlayerCallback


Callbacks that the player must fire.

Summary

Public methods

abstract void
onAdProgress(
    AdMediaInfo adMediaInfo,
    VideoProgressUpdate videoProgressUpdate
)

Fire this callback periodically as ad playback occurs.

abstract void
onBuffering(AdMediaInfo adMediaInfo)

Fire this callback when video playback stalls waiting for data.

abstract void

Fire this callback when all content has finished playing.

abstract void
onEnded(AdMediaInfo adMediaInfo)

Fire this callback when the video finishes playing.

abstract void
onError(AdMediaInfo adMediaInfo)

Fire this callback when the video has encountered an error.

abstract void
onLoaded(AdMediaInfo adMediaInfo)

Fire this callback when the video is ready to begin playback.

abstract void
onPause(AdMediaInfo adMediaInfo)

Fire this callback when the video is paused.

abstract void
onPlay(AdMediaInfo adMediaInfo)

Fire this callback when the player begins playing a video.

abstract void
onResume(AdMediaInfo adMediaInfo)

Fire this callback when the video is unpaused.

abstract void
onVolumeChanged(AdMediaInfo adMediaInfo, int percentage)

Fire this callback when the playback volume changes.

Public methods

onAdProgress

abstract void onAdProgress(
    AdMediaInfo adMediaInfo,
    VideoProgressUpdate videoProgressUpdate
)

Fire this callback periodically as ad playback occurs. Best practice is to call it on start, and every 100ms afterwards. Failure to do so may result in lost ad impressions, or invalidation of impressions.

onBuffering

abstract void onBuffering(AdMediaInfo adMediaInfo)

Fire this callback when video playback stalls waiting for data.

onContentComplete

abstract void onContentComplete()

Fire this callback when all content has finished playing. This will allow the SDK to play post-roll ads, if any are loaded through ad rules.

onEnded

abstract void onEnded(AdMediaInfo adMediaInfo)

Fire this callback when the video finishes playing.

onError

abstract void onError(AdMediaInfo adMediaInfo)

Fire this callback when the video has encountered an error.

onLoaded

abstract void onLoaded(AdMediaInfo adMediaInfo)

Fire this callback when the video is ready to begin playback. This indicates that at least some media has been buffered into the VideoAdPlayer.

onPause

abstract void onPause(AdMediaInfo adMediaInfo)

Fire this callback when the video is paused.

onPlay

abstract void onPlay(AdMediaInfo adMediaInfo)

Fire this callback when the player begins playing a video.

onResume

abstract void onResume(AdMediaInfo adMediaInfo)

Fire this callback when the video is unpaused.

onVolumeChanged

abstract void onVolumeChanged(AdMediaInfo adMediaInfo, int percentage)

Fire this callback when the playback volume changes.