VideoAdPlayer

public interface VideoAdPlayer implements AdProgressProvider VolumeProvider

Defines the set of methods that a video player must implement to be used by the IMA SDK, as well as a set of callbacks that it must fire. This player should use the callbacks provided while interacting with ads only. VideoAdPlayer interface should be controlled only by IMA SDK and should not be accessed by the application directly. Use AdsManager API to control ad playback.

Nested Class Summary

interface VideoAdPlayer.VideoAdPlayerCallback Callbacks that the player must fire. 

Public Method Summary

abstract void
abstract void
loadAd(AdMediaInfo adMediaInfo, AdPodInfo adPodInfo)
Loads a video ad hosted at AdMediaInfo.
abstract void
pauseAd(AdMediaInfo adMediaInfo)
Pauses playing the current ad.
abstract void
playAd(AdMediaInfo adMediaInfo)
Starts or resumes playing the video ad referenced by the AdMediaInfo, provided loadAd has already been called for it.
abstract void
release()
Cleans up and releases all resources used by the VideoAdPlayer.
abstract void
removeCallback(VideoAdPlayer.VideoAdPlayerCallback callback)
Removes a callback.
abstract void
stopAd(AdMediaInfo adMediaInfo)
Stops playing the current ad.

Inherited Method Summary

Public Methods

public abstract void addCallback (VideoAdPlayer.VideoAdPlayerCallback callback)

Adds a callback.

Parameters
callback

public abstract void loadAd (AdMediaInfo adMediaInfo, AdPodInfo adPodInfo)

Loads a video ad hosted at AdMediaInfo. This is the first call the VideoAdPlayer will receive for a given Ad Media. The player should store the instance of AdMediaInfo and include it when calling all methods from the VideoAdPlayerCallback. Should only be called by the SDK.

Parameters
adMediaInfo
adPodInfo

public abstract void pauseAd (AdMediaInfo adMediaInfo)

Pauses playing the current ad. Should only be called by the SDK.

Parameters
adMediaInfo

public abstract void playAd (AdMediaInfo adMediaInfo)

Starts or resumes playing the video ad referenced by the AdMediaInfo, provided loadAd has already been called for it. Should only be called by the SDK.

Parameters
adMediaInfo

public abstract void release ()

Cleans up and releases all resources used by the VideoAdPlayer. Should only be called by the SDK.

public abstract void removeCallback (VideoAdPlayer.VideoAdPlayerCallback callback)

Removes a callback.

Parameters
callback

public abstract void stopAd (AdMediaInfo adMediaInfo)

Stops playing the current ad. Also used to clean up an ad after completion. Should only be called by the SDK.

Parameters
adMediaInfo

Send feedback about...

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