AI-generated Key Takeaways
-
BreaksEvent provides event data for various break-related events like start, end, and loading of breaks and break clips.
-
The constructor for BreaksEvent takes parameters such as event type, current media time, break and clip indices, skippable time, ended reason, and break/clip IDs.
-
Key properties of a BreaksEvent include the IDs of the break and break clip, the media time at which the event occurred, the reason a clip ended, and the index and total count of break clips.
cast.
framework
.
events
.
BreaksEvent
Event data for all events pertaining to breaks: cast.framework.events.EventType.BREAK_ENDED
, cast.framework.events.EventType.BREAK_STARTED
, cast.framework.events.EventType.BREAK_CLIP_ENDED
, cast.framework.events.EventType.BREAK_CLIP_LOADING
, and cast.framework.events.EventType.BREAK_CLIP_STARTED
Constructor
BreaksEvent
new BreaksEvent(type, currentMediaTime, index, total, whenSkippable, endedReason, breakClipId, breakId)
Parameter
type
cast.framework.events.EventType
Value must not be null.
currentMediaTime
Optional
number
index
Optional
number
Index of current break clip among all break clips that break includes.
total
Optional
number
Total number of break clip that break includes.
whenSkippable
Optional
number
When current break get skippable.
endedReason
breakClipId
Optional
string
The break clip's id. Refer to cast.framework.messages.BreakClip.id
breakId
Optional
string
The break's id. Refer to cast.framework.messages.Break.id
Properties
breakClipId
(string or undefined)
The break clip's ID. Refer to cast.framework.messages.BreakClip.id
breakId
(string or undefined)
The break's id. Refer to cast.framework.messages.Break.id
currentMediaTime
(number or undefined)
The time in the currently-playing media when the break event occurred. For the client-side stitched ads, this represents the media time of a break clip when the event occurred.
endedReason
(non-null cast.framework.events.EndedReason or undefined)
The reason the break clip ended.
index
(number or undefined)
Index of break clip, which starts from 1.
total
(number or undefined)
Total number of break clips.
whenSkippable
(number or undefined)
How long the current break clip must play before the viewer is permitted to skip (in seconds).

