AdCuePointComponent

Before Video playback, converts Slots in an IAdContext into relevant CuePoints, then during playback is responsible for handling FreeWheel ad Cuepoints emitted by the VideoController. Before Video playback (most likely during SET_SOURCE), the AdCueComponent creates a series of CuePoints based on the current populated AdContext.

It will create one CuePoint for all pre-roll ads (with CuePoint.Type of BEFORE), one CuePoint for all post-roll ads, and one for each mid-roll (POINT_IN_TIME) and overlay ad.

Due to the nature of the hooks in to the EventEmitter that the AdCuePointComponent creates, it should be instantiated as soon as possible after the FreeWheelController

See also

CuePoint
IAdContext

Constructors

Link copied to clipboard
constructor(emitter: EventEmitter)

Properties

Link copied to clipboard
val CLEAR_PLAYED_SLOTS: String = "clearPlayedSlots"
Flag that when added to a COMPLETED event enables the clearing of the playedSlots, so ads will be shown again upon replay.
Link copied to clipboard
open val currentVideoAdSlots: List<ISlot>
current playing slots which block the player activity
Link copied to clipboard
val CUSTOM_ID: String = "customId"
Link copied to clipboard
open val isLocked: Boolean
Link copied to clipboard
val LINEAR: String = "linear"
Link copied to clipboard
val NONLINEAR: String = "non-linear"
Link copied to clipboard
val playedSlots: List<ISlot>
Link copied to clipboard
val postRollSlots: List<ISlot>
Link copied to clipboard
val preRollSlots: List<ISlot>
Link copied to clipboard
val SLOT: String = "slot"
Link copied to clipboard
val TYPE: String = "type"

Functions

Link copied to clipboard
open fun addCuePoints(context: IAdContext)
Given an instance of IAdContext, parses the Ad slots contained in the context and generates CuePoints.
Link copied to clipboard
open fun disable()
Removes the listeners from the Component.
Link copied to clipboard
open fun enable()
Link copied to clipboard
open fun lock()
'Locks' the FreeWheelController; afterwards, certain events will be stopped and prevented from bubbling
Link copied to clipboard
open fun setLiveVideoChecker(liveVideoChecker: LiveVideoChecker)
Link copied to clipboard
open fun skipCurrentAd()
Skips the currently playing advertisement within the active Ad break (a.k.
Link copied to clipboard
Skips the current advertisement break (a.k.
Link copied to clipboard
open fun skipCurrentAds()
Functions the same as skipCurrentAdBreak
Link copied to clipboard
open fun unlock()
Tell the control to 'unlock' the normal Video playback control flow by re-emitting the Intercepted Event