@Emits(events="seekTo") @ListensFor(events={"seekTo","didSeekTo","skipAd"}) public class SeekManager extends AbstractComponent implements TickerObserver
eventEmitter, listenerTokens| Constructor and Description |
|---|
SeekManager(VideoPlaybackController videoPlaybackController,
Timeline timeline,
Ticker ticker)
Instantiates a new Seek manager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addSeekListener(SeekListener seekListener)
Adds a seek listener
|
void |
onComplete(com.brightcove.ssai.seek.SeekTask seekTask)
Tells the Seekable that the seek task has been completed.
|
void |
onTick(long lastPlayheadPositionMillis,
long currentPlayheadPositionMillis)
A tick represent an poll from the underlying video player.
|
void |
removeAllSeekListeners()
Removes all seek listeners.
|
void |
removeListeners()
Removes all set listeners from the EventEmitter.
|
boolean |
removeSeekListener(SeekListener seekListener)
Removes a seek listener
|
void |
seekTo(long seekAbsolutePosition,
long seekRelativePosition)
Seek to the specified timeline playhead position.
|
addListener, addOnceListener, getEventEmitter, removeListenerpublic SeekManager(VideoPlaybackController videoPlaybackController, Timeline timeline, Ticker ticker)
videoPlaybackController - the Video playback controllertimeline - the timelineticker - the tickerpublic void onTick(long lastPlayheadPositionMillis,
long currentPlayheadPositionMillis)
TickerObserveronTick in interface TickerObserverlastPlayheadPositionMillis - the last playhead position in millisecondscurrentPlayheadPositionMillis - the current playhead position in millisecondspublic void removeListeners()
AbstractComponentremoveListeners in class AbstractComponentpublic boolean addSeekListener(@NonNull
SeekListener seekListener)
seekListener - the seek listenerpublic boolean removeSeekListener(@NonNull
SeekListener seekListener)
seekListener - the seek listenerpublic void removeAllSeekListeners()
public void seekTo(long seekAbsolutePosition,
long seekRelativePosition)
This method might be called several times before the onComplete is called, depending on the Ad
seekAbsolutePosition - the absolute seek positionseekRelativePosition - the relative seek positionpublic void onComplete(com.brightcove.ssai.seek.SeekTask seekTask)
seekTask - the seek task