Timeline

interface Timeline

The Timeline interface is a representation of a single SSAI video, that is, a video with its Ads stitched in the video itself.

Author

Sergio Martinez - smartinez@brightcove.com

Types

Link copied to clipboard
enum Type
The Timeline Type.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun getAbsolutePlayheadPosition(contentPlayheadPosition: Long): Long
Converts the relative content position to its absolute playhead position.
Link copied to clipboard
abstract fun getAdMarkerPositions(): List<Long>
It returns a list of Ad markers positions with respect to the relative content timeline.
Link copied to clipboard
abstract fun getAdPodAt(absolutePlayheadPosition: Long): AdPod
Returns the Ad pod at the position specified by the absolute playhead position, if the position belongs to an Ad, or null if it belongs to content.
Link copied to clipboard
abstract fun getAdPods(): List<AdPod>
Searchs through the timeline and returns the list of Ad Pods that belongs to those Ad Timeline Blocks.
Link copied to clipboard
abstract fun getContentLength(): Long
It returns the content duration.
Link copied to clipboard
abstract fun getContentPlayheadPosition(absolutePlayheadPosition: Long): Long
Calculates the corresponding content playhead position given the absolute playhead position, that is, the playhead position as if there were no Ads stitched to the content.
Link copied to clipboard
abstract fun getRelativePlayheadPosition(absolutePlayheadPosition: Long): Long
Calculates the relative playhead position given the absolute playhead position.
Link copied to clipboard
abstract fun getTimelineBlockAt(absolutePlayheadPosition: Long): TimelineBlock
Returns the TimelineBlock at the specified absolutePlayheadPosition.
Link copied to clipboard
abstract fun getTotalLength(): Long
It returns the total duration of the video.
Link copied to clipboard
abstract fun getType(): Timeline.Type
Gets the Timeline type.
Link copied to clipboard
abstract fun isPlayingAd(absolutePlayheadPosition: Long): Boolean
Checks the playhead position and verifies whether we are inside an Ad block or not.
Link copied to clipboard
open fun notifyTimedAdPodFound(adPod: AdPod)
Notifies this timeline that an AdPod has been found as timed metadata.
Link copied to clipboard
open fun reset()
Resets this timeline to its default initial value.
Link copied to clipboard
open fun updatePlayableWindow(minimumPlayheadPosition: Long, maximumPlayheadPosition: Long)
Updates the playable window within the Timeline.