-
- All Implemented Interfaces:
-
com.brightcove.dai.timeline.ticker.TickerObserver
public class TimelineManager implements TickerObserver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
TimelineManager.Listener
-
Field Summary
Fields Modifier and Type Field Description private final Timeline
timeline
private long
currentRelativeDuration
private boolean
isPlayingAd
private final SeekListener
seekListener
-
Constructor Summary
Constructors Constructor Description TimelineManager(BaseVideoView baseVideoView, StreamManager streamManager, Video video, Timeline.Type type)
-
Method Summary
Modifier and Type Method Description Timeline
getTimeline()
long
getCurrentRelativeDuration()
Gets the current relative duration of the playing media. boolean
isPlayingAd()
SeekListener
getSeekListener()
long
shouldRestorePositionAfterSeeking()
long
getContentDuration()
long
getStreamDuration()
long
getCurrentRelativePosition()
Gets the current relative position of the playing media. long
getCurrentStreamPosition()
long
getContentPosition(long absolutePosition)
long
getStreamPosition(long contentPosition)
void
onTick(long lastPlayheadPosition, long currentPlayheadPosition)
A tick represent an poll from the underlying video player. void
setAdIsPlaying(boolean isAdPlaying)
void
addAd(Ad ad)
Ad
getCurrentAdPlaying()
void
setCurrentAdPlaying(Ad ad)
void
setCuePoints(List<CuePoint> cuePoints)
void
reset()
void
addListener(TimelineManager.Listener timelineManagerListeners)
void
removeListener(TimelineManager.Listener timelineManagerListener)
-
-
Constructor Detail
-
TimelineManager
TimelineManager(BaseVideoView baseVideoView, StreamManager streamManager, Video video, Timeline.Type type)
-
-
Method Detail
-
getTimeline
Timeline getTimeline()
-
getCurrentRelativeDuration
long getCurrentRelativeDuration()
Gets the current relative duration of the playing media.It could be from the content or from the ad
-
isPlayingAd
boolean isPlayingAd()
-
getSeekListener
SeekListener getSeekListener()
-
shouldRestorePositionAfterSeeking
long shouldRestorePositionAfterSeeking()
-
getContentDuration
long getContentDuration()
-
getStreamDuration
long getStreamDuration()
-
getCurrentRelativePosition
long getCurrentRelativePosition()
Gets the current relative position of the playing media.It could be from the content or from the ad
-
getCurrentStreamPosition
long getCurrentStreamPosition()
-
getContentPosition
long getContentPosition(long absolutePosition)
-
getStreamPosition
long getStreamPosition(long contentPosition)
-
onTick
void onTick(long lastPlayheadPosition, long currentPlayheadPosition)
A tick represent an poll from the underlying video player.
- Parameters:
lastPlayheadPosition
- the last playhead position in millisecondscurrentPlayheadPosition
- the current playhead position in milliseconds
-
setAdIsPlaying
void setAdIsPlaying(boolean isAdPlaying)
-
getCurrentAdPlaying
Ad getCurrentAdPlaying()
-
setCurrentAdPlaying
void setCurrentAdPlaying(Ad ad)
-
setCuePoints
void setCuePoints(List<CuePoint> cuePoints)
-
reset
void reset()
-
addListener
void addListener(TimelineManager.Listener timelineManagerListeners)
-
removeListener
void removeListener(TimelineManager.Listener timelineManagerListener)
-
-
-
-