Package com.yandex.mobile.ads.instream
Class InstreamAdBinder
-
- All Implemented Interfaces:
-
com.monetization.ads.instream.binder.UnifiedInstreamAdBinder
@MainThread() public final class InstreamAdBinder extends PrivateInstreamAdBinder implements UnifiedInstreamAdBinder
InstreamAdBinder allows automatic presenting of instream ads
-
-
Constructor Summary
Constructors Constructor Description InstreamAdBinder(Context context, InstreamAd instreamAd, InstreamAdPlayer instreamAdPlayer, VideoPlayer videoPlayer)
-
Method Summary
Modifier and Type Method Description final Unit
bind(InstreamAdView instreamAdView)
Starts instream ad playback final Unit
invalidateVideoPlayer()
Invalidates video playback. Unit
invalidateAdPlayer()
Invalidates ad playback. final Unit
setInstreamAdListener(InstreamAdListener listener)
Register a callback for listening InstreamAdBinder. final Unit
unbind()
Unbinds binder from passed view and pauses ad playback final Unit
prepareAd()
Prepare preroll (if it exists in ad) final Unit
setVideoAdPlaybackListener(VideoAdPlaybackListener listener)
Sets listener for single video ad creative playback events. -
-
Constructor Detail
-
InstreamAdBinder
InstreamAdBinder(Context context, InstreamAd instreamAd, InstreamAdPlayer instreamAdPlayer, VideoPlayer videoPlayer)
-
-
Method Detail
-
bind
final Unit bind(InstreamAdView instreamAdView)
Starts instream ad playback
- Parameters:
instreamAdView
- the view in which instream ad breaks will be displayed
-
invalidateVideoPlayer
final Unit invalidateVideoPlayer()
Invalidates video playback. Call this method right before video player is invalidated.
-
invalidateAdPlayer
Unit invalidateAdPlayer()
Invalidates ad playback. Call this method right before ad player is invalidated.
-
setInstreamAdListener
final Unit setInstreamAdListener(InstreamAdListener listener)
Register a callback for listening InstreamAdBinder.
- Parameters:
listener
- an InstreamAdListener object that handles lifecycle of instream ad.
-
setVideoAdPlaybackListener
final Unit setVideoAdPlaybackListener(VideoAdPlaybackListener listener)
Sets listener for single video ad creative playback events.
- Parameters:
listener
- A VideoAdPlaybackListener that will be triggered on video events.
-
-
-
-