DefaultPlaybackPolicyHandler

class DefaultPlaybackPolicyHandler : PlaybackPolicyHandler

Reference implementation of PlaybackPolicyHandler

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun canChangeVolume(mute: Boolean, playheadMs: Long, timeline: MutableList<AdBreak>): Boolean

Returns to the client whether volume can be muted.

Link copied to clipboard
open override fun canClickThrough(url: String, playheadMs: Long, timeline: List<AdBreak>): Boolean

Returns to the client whether the user can click-through.

Link copied to clipboard
open override fun canPause(playheadMs: Long, timeline: MutableList<AdBreak>): Boolean

Returns to the client whether playback can pause.

Link copied to clipboard
open override fun canResize(fullScreen: Boolean, playheadMs: Long, timeline: List<AdBreak>): Boolean

Returns to the client whether full screen mode can change.

Link copied to clipboard
open override fun canResizeCreative(expand: Boolean, playheadMs: Long, timeline: List<AdBreak>): Boolean

Returns to the client whether the currently-displayed linear creative can be expanded. Note that this method is not applicable to nonlinear creative.

Link copied to clipboard
open override fun canSkip(playheadMs: Long, timeline: MutableList<AdBreak>, durationMs: Long): Int

Returns to the client whether playback can skip.

Link copied to clipboard
open override fun canStop(playheadMs: Long, timeline: MutableList<AdBreak>): Boolean

Returns to the client whether playback can stop.

Link copied to clipboard
open override fun didSeek(fromMs: Long, toMs: Long, timeline: List<AdBreak>)

Indicates that playback seeked.

Link copied to clipboard
open override fun didSkip(fromMs: Long, toMs: Long, timeline: List<AdBreak>)

Indicates that playback was skipped.

Link copied to clipboard
open override fun setPlaybackMode(sessionPlaybackMode: Session.PlaybackMode)

Sets the playback mode that the stream is running in. The policy handler implementation may use this to modify the policy for specific requests, for example allowing pause in VOD but not in Live playback.

Link copied to clipboard
open override fun willSeekTo(positionMs: Long, timeline: MutableList<AdBreak>?, playhead: Long): Long

Returns to the client the playhead position, in milliseconds, that the user can seek to.