Package com.castlabs.android.adverts
Interface AdInterface.Listener
- Enclosing interface:
- AdInterface
public static interface AdInterface.Listener
-
Method Summary
Modifier and TypeMethodDescriptionvoidThis callback is fired right after the Ad playback has finished.voidonAdError(CastlabsPlayerException exception) This callback is fired if there is an error on loading or during the Ad playback.voidonAdPlaybackPositionChanged(long playbackPositionMs) Event triggered when the Ad playback position changed.voidThis callback is fired if the user skip the AdvoidonAdStarted(Ad ad) This callback is fired right before the Ad is about to start playing.
-
Method Details
-
onAdStarted
This callback is fired right before the Ad is about to start playing. Usually the content player controls should be hidden and turned into disabled state.- Parameters:
ad- The Ad object
-
onAdCompleted
void onAdCompleted()This callback is fired right after the Ad playback has finished. Usually the content player controls should become visible and enabled. -
onAdError
This callback is fired if there is an error on loading or during the Ad playback.- Parameters:
exception- The error's exception
-
onAdSkipped
void onAdSkipped()This callback is fired if the user skip the Ad -
onAdPlaybackPositionChanged
void onAdPlaybackPositionChanged(long playbackPositionMs) Event triggered when the Ad playback position changed. Note that for performance reasons, this is triggered at most once per second, hence you will only see when seconds changing during playback.- Parameters:
playbackPositionMs- the current Ad playback position in milliseconds
-