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

Send feedback about...

IMA DAI SDK for Android
Need help? Visit our support page.