PolicyRuleHandler

Provides generic protocol for handling policy rules.

Properties

Link copied to clipboard
abstract val player: Player
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val timeline: List<AdBreakInfo>

Functions

Link copied to clipboard
open fun getUnwatchedCuePoints(allCuePoints: List<Long>, watchedAdsCuePoints: List<Long>): List<Long>?

Computes a list of unwatched ad cue points.

Link copied to clipboard
abstract fun handlePolicyRule(policyRule: Int, absoluteContentPositionMs: Long)

Handles a given policy rule for requested content seek position.

Link copied to clipboard

Determines if another seek call is required based on the current internal state.

open fun maybeProcessNextPlayerSeek(absolutePlayheadPositionMs: Long): Boolean

Determines if another seek call is required based on the player absolute playhead position (in milliseconds). Note that the player absolute playhead position includes the duration of all the pre-roll and mid-roll ad breaks that are present for that position.