-
public interface AdPlayer.Listener<T>
Represents the callbacks from an AdPlayer.
-
-
Method Summary
Modifier and Type Method Description abstract void
onAdProgress(long position, @NonNull() T ad)
Called when an ad has made progress. abstract void
onDurationChanged(long duration)
Called when an Ad duration has been changed. abstract void
onAdStarted(@NonNull() T ad)
Called when an Ad is started. abstract void
onAdCompleted(@NonNull() T ad)
Called when an Ad is completed. abstract void
onAdPaused(@NonNull() T ad)
Called when an Ad is paused. abstract void
onAdResumed(@NonNull() T ad)
Called when an ad is resumed. abstract void
onAdSkipped(@NonNull() T ad)
Called when an ad is skipped. void
onError(@NonNull() Exception e)
Called when an error happened. abstract void
onError(@NonNull() T ad, @NonNull() Exception e)
Called when an error happened. -
-
Method Detail
-
onAdProgress
abstract 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
abstract void onDurationChanged(long duration)
Called when an Ad duration has been changed.
- Parameters:
duration
- the duration of the current Ad.
-
onAdStarted
abstract void onAdStarted(@NonNull() T ad)
Called when an Ad is started.
- Parameters:
ad
- the started Ad.
-
onAdCompleted
abstract void onAdCompleted(@NonNull() T ad)
Called when an Ad is completed.
- Parameters:
ad
- the completed Ad.
-
onAdPaused
abstract void onAdPaused(@NonNull() T ad)
Called when an Ad is paused.
- Parameters:
ad
- the paused ad.
-
onAdResumed
abstract void onAdResumed(@NonNull() T ad)
Called when an ad is resumed.
- Parameters:
ad
- the resumed Ad.
-
onAdSkipped
abstract void onAdSkipped(@NonNull() T ad)
Called when an ad is skipped.
- Parameters:
ad
- the skipped ad.
-
onError
@Deprecated() void onError(@NonNull() Exception e)
Called when an error happened.
- Parameters:
e
- exception.
-
-
-
-