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 anAdPlayer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidonAdCompleted(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 voidonError(java.lang.Exception e)Deprecated.Use @link #onError(Object, Exception)}.voidonError(T ad, java.lang.Exception e)Called when an error happened.
-
-
-
Method Detail
-
onAdProgress
void onAdProgress(long position, @NonNull T ad)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
void onAdStarted(@NonNull T ad)Called when an Ad is started.- Parameters:
ad- the started Ad.
-
onAdCompleted
void onAdCompleted(@NonNull T ad)Called when an Ad is completed.- Parameters:
ad- the completed Ad.
-
onAdPaused
void onAdPaused(@NonNull T ad)Called when an Ad is paused.- Parameters:
ad- the paused ad.
-
onAdResumed
void onAdResumed(@NonNull T ad)Called when an ad is resumed.- Parameters:
ad- the resumed Ad.
-
onAdSkipped
void onAdSkipped(@NonNull T ad)Called when an ad is skipped.- Parameters:
ad- the skipped ad.
-
onError
@Deprecated default void onError(@NonNull java.lang.Exception e)Deprecated.Use @link #onError(Object, Exception)}.Called when an error happened.- Parameters:
e- exception.
-
onError
void onError(@NonNull T ad, @NonNull java.lang.Exception e)Called when an error happened.- Parameters:
ad- the ad that failed to play and originated the error.e- exception.
-
-