Interface Inroll
-
- All Implemented Interfaces:
@MainThread() public interface Inroll
This class is used to play inroll ad breaks.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
setListener(InstreamAdBreakEventListener listener)
Register a callback for listening inroll playback events. abstract Unit
setVideoAdPlaybackListener(VideoAdPlaybackListener listener)
Register a callback for listening video playback events abstract Unit
prepare(InstreamAdPlayer instreamAdPlayer)
Prepare inroll playback. abstract Unit
play(InstreamAdView instreamAdView)
Start inroll playback. abstract Unit
pause()
Pause inroll playback. abstract Unit
resume()
Resume paused inroll playback. abstract Unit
invalidate()
Invalidate inroll playback. abstract InstreamAdBreak
getInstreamAdBreak()
Returns InstreamAdBreak that's associated with this inroll. -
-
Method Detail
-
setListener
abstract Unit setListener(InstreamAdBreakEventListener listener)
Register a callback for listening inroll playback events.
- Parameters:
listener
- an InstreamAdBreakEventListener object that handles lifecycle of inroll.
-
setVideoAdPlaybackListener
abstract Unit setVideoAdPlaybackListener(VideoAdPlaybackListener listener)
Register a callback for listening video playback events
- Parameters:
listener
- an VideoAdPlaybackListener object that handles video playback events.
-
prepare
abstract Unit prepare(InstreamAdPlayer instreamAdPlayer)
Prepare inroll playback. Note that prepare() should always be called before play() method.
- Parameters:
instreamAdPlayer
- player to play inroll.
-
play
abstract Unit play(InstreamAdView instreamAdView)
Start inroll playback. Note that you can call play only on a prepared inroll.
- Parameters:
instreamAdView
- the view in which inroll will be displayed.
-
invalidate
abstract Unit invalidate()
Invalidate inroll playback. Call this method right before ad player is invalidated. To resume playback after invalidation you should prepare and start inroll again.
-
getInstreamAdBreak
abstract InstreamAdBreak getInstreamAdBreak()
Returns InstreamAdBreak that's associated with this inroll.
-
-
-
-