PlaybackPolicyHandler
Handler interface that enforces the policies related to the content with ads, and promos where special handling is required for seeking, timeline adjustment, interrupt handling etc.
Types
Properties
AdPlaybackPolicy rules that this PlaybackPolicyHandler is handling.
Sets the AdTrackingEvent instance based on the current Ad Playback Session lifecycle.
Sets a listener to receive ad playback policy related events during ad playback. The listener's methods will be called on the UI thread.
The Player instance that this PlaybackPolicyHandler is associated with.
Functions
Determines a content duration discounting the sum of all ad break durations.
Determines a relative content playhead position, discounting the sum of all ad break durations prior to the absolute playhead position provided. This allows the client to return to the same content position if a VOD stream is stopped before playback ends.
Determines an absolute playhead position calculating the sum of all ad break durations prior to that absolute playhead position plus the relative content playhead position. This allows the client to return to the same content position if a VOD stream is stopped before playback ends.
Notifies the PlaybackPolicyHandler implementation that the playback was interrupted e.g. Phone Call etc.
Solicits to seek to the desired time position. This is just providing the player's seek position intent since the real seek position needs to be determined by the ad playback rules (a.k.a. scrub management policies). For example: A user may scrub over one/several Ad Breaks but on resume of the video play:
Provides the timeline of all ad breaks that drives policy rules handling.