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 TypeMethodDescriptionvoid
onAdCompleted
(T ad) Called when an Ad is completed.void
onAdPaused
(T ad) Called when an Ad is paused.void
onAdProgress
(long position, T ad) Called when an ad has made progress.void
onAdResumed
(T ad) Called when an ad is resumed.void
onAdSkipped
(T ad) Called when an ad is skipped.void
onAdStarted
(T ad) Called when an Ad is started.void
onDurationChanged
(long duration) Called when an Ad duration has been changed.default void
Deprecated.Use @link #onError(Object, Exception)}.void
Called 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.
-