VideoAdPlayer.VideoAdPlayerCallback

public static interface VideoAdPlayer.VideoAdPlayerCallback

Callbacks that the player must fire.

Public Method Summary

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
onContentComplete()
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

public 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.

Parameters
adMediaInfo
videoProgressUpdate

public abstract void onBuffering (AdMediaInfo adMediaInfo)

Fire this callback when video playback stalls waiting for data.

Parameters
adMediaInfo

public 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 via ad rules.

public abstract void onEnded (AdMediaInfo adMediaInfo)

Fire this callback when the video finishes playing.

Parameters
adMediaInfo

public abstract void onError (AdMediaInfo adMediaInfo)

Fire this callback when the video has encountered an error.

Parameters
adMediaInfo

public 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.

Parameters
adMediaInfo

public abstract void onPause (AdMediaInfo adMediaInfo)

Fire this callback when the video is paused.

Parameters
adMediaInfo

public abstract void onPlay (AdMediaInfo adMediaInfo)

Fire this callback when the player begins playing a video.

Parameters
adMediaInfo

public abstract void onResume (AdMediaInfo adMediaInfo)

Fire this callback when the video is unpaused.

Parameters
adMediaInfo

public abstract void onVolumeChanged (AdMediaInfo adMediaInfo, int percentage)

Fire this callback when the playback volume changes.

Parameters
adMediaInfo
percentage