StaticTimeline

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addAd(ad: Ad)
Ads a new ad to the Timeline
Link copied to clipboard
open fun getAds(): List<Ad>
Returns the list of Ads in the media item Important: In DAI, Google does not give the list of all ads that will be stitched in the video.
Link copied to clipboard
It returns the content duration.
Link copied to clipboard
open fun getContentPosition(absolutePosition: 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
It returns the total duration of the video.
Link copied to clipboard
open fun getStreamPosition(contentPosition: Long): Long
Converts the content position to its absolute position.
Link copied to clipboard
Returns the total duration of all the ads stitched in the stream
Link copied to clipboard
Gets the Timeline type.
Link copied to clipboard
open fun isCuePointCrossed(position: Long): CuePoint
Checks if the given position crossed a cue point
Link copied to clipboard
open fun reset()
Resets this timeline to its default initial value.
Link copied to clipboard
open fun setAdIsPlaying(isAdPlaying: Boolean)
Sets if an ad is playing
Link copied to clipboard
open fun setCuePoints(cuePoints: List<CuePoint>)
Sets the list of cue points to the Timeline
Link copied to clipboard
open fun setType(type: Timeline.Type)