Package com.brightcove.player.ads
Interface AdPlayer.Listener<T>
- Type Parameters:
T- the type of Ad handled by theAdPlayer.
- All Known Implementing Classes:
GoogleIMAVideoAdPlayer,PulseAdView
public static interface AdPlayer.Listener<T>
Represents the callbacks from an
AdPlayer.-
Method Summary
Modifier and TypeMethodDescriptionvoidonAdCompleted(T ad) Called when an Ad is completed.voidonAdPaused(T ad) Called when an Ad is paused.voidonAdProgress(long position, T ad) Called when an ad has made progress.voidonAdResumed(T ad) Called when an ad is resumed.voidonAdSkipped(T ad) Called when an ad is skipped.voidonAdStarted(T ad) Called when an Ad is started.voidonDurationChanged(long duration) Called when an Ad duration has been changed.default voidDeprecated.Use @link #onError(Object, Exception)}.voidCalled when an error happened.
-
Method Details
-
onAdProgress
Called when an ad has made progress.- Parameters:
position- the current position of the playback in milliseconds.ad- the current ad being played.
-
onDurationChanged
void onDurationChanged(long duration) Called when an Ad duration has been changed.- Parameters:
duration- the duration of the current Ad.
-
onAdStarted
Called when an Ad is started.- Parameters:
ad- the started Ad.
-
onAdCompleted
Called when an Ad is completed.- Parameters:
ad- the completed Ad.
-
onAdPaused
Called when an Ad is paused.- Parameters:
ad- the paused ad.
-
onAdResumed
Called when an ad is resumed.- Parameters:
ad- the resumed Ad.
-
onAdSkipped
Called when an ad is skipped.- Parameters:
ad- the skipped ad.
-
onError
Deprecated.Use @link #onError(Object, Exception)}.Called when an error happened.- Parameters:
e- exception.
-
onError
Called when an error happened.- Parameters:
ad- the ad that failed to play and originated the error.e- exception.
-