Data peristiwa untuk semua peristiwa yang berkaitan dengan jeda:
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, dan
cast.framework.events.EventType.BREAK_CLIP_STARTED
Konstruktor
BreaksEvent
new
BreaksEvent(type, currentMediaTime, index, total, whenDapat dilewati, akhirReason, breakClipId, breakId)
ID klip jeda iklan. Lihat cast.framework.messages.BreakClip.id
breakId
Opsional
string
ID jeda. Lihat cast.framework.messages.Break.id
Properti
breakClipId
konstan
(string atau tidak ditentukan)
ID klip jeda iklan. Lihat cast.framework.messages.BreakClip.id
breakId
konstan
(string atau tidak ditentukan)
ID jeda. Lihat cast.framework.messages.Break.id
currentMediaTime
konstan
(angka atau tidak ditentukan)
Waktu dalam media yang sedang diputar saat peristiwa jeda terjadi.
Untuk iklan gabungan sisi klien, peristiwa ini menunjukkan waktu media
klip jeda saat peristiwa terjadi.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecast.framework.events.BreaksEvent\u003c/code\u003e class provides data for events related to breaks in media playback, such as break start, end, clip loading, and clip start/end.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003ebreakClipId\u003c/code\u003e, \u003ccode\u003ebreakId\u003c/code\u003e, \u003ccode\u003ecurrentMediaTime\u003c/code\u003e, \u003ccode\u003eendedReason\u003c/code\u003e, \u003ccode\u003eindex\u003c/code\u003e, \u003ccode\u003etotal\u003c/code\u003e, and \u003ccode\u003ewhenSkippable\u003c/code\u003e to provide detailed information about the break event.\u003c/p\u003e\n"],["\u003cp\u003eThe constructor for \u003ccode\u003eBreaksEvent\u003c/code\u003e takes parameters such as \u003ccode\u003etype\u003c/code\u003e, \u003ccode\u003ecurrentMediaTime\u003c/code\u003e, \u003ccode\u003eindex\u003c/code\u003e, \u003ccode\u003etotal\u003c/code\u003e, \u003ccode\u003ewhenSkippable\u003c/code\u003e, \u003ccode\u003eendedReason\u003c/code\u003e, \u003ccode\u003ebreakClipId\u003c/code\u003e, and \u003ccode\u003ebreakId\u003c/code\u003e to initialize the event data.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eBreaksEvent\u003c/code\u003e properties to access information about the break event, such as the break clip ID, break ID, current media time, and reason for the break clip ending.\u003c/p\u003e\n"]]],[],null,["# Class: BreaksEvent\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[events](/cast/docs/reference/web_receiver/cast.framework.events).BreaksEvent\n================================================================================================================================================\n\nclass static\n\nEvent data for all events pertaining to breaks:\n`cast.framework.events.EventType.BREAK_ENDED`,\n`cast.framework.events.EventType.BREAK_STARTED`,\n`cast.framework.events.EventType.BREAK_CLIP_ENDED`,\n`cast.framework.events.EventType.BREAK_CLIP_LOADING`, and\n`cast.framework.events.EventType.BREAK_CLIP_STARTED`\n\nConstructor\n-----------\n\n### BreaksEvent\n\nnew\nBreaksEvent(type, currentMediaTime, index, total, whenSkippable, endedReason, breakClipId, breakId)\n\n| #### Parameter ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| type | [cast.framework.events.EventType](/cast/docs/reference/web_receiver/cast.framework.events#.EventType) Value must not be null. |\n| currentMediaTime | Optional number |\n| index | Optional number Index of current break clip among all break clips that break includes. |\n| total | Optional number Total number of break clip that break includes. |\n| whenSkippable | Optional number When current break get skippable. |\n| endedReason | Optional [cast.framework.events.EndedReason](/cast/docs/reference/web_receiver/cast.framework.events#.EndedReason) The reason the break clip ended. Value must not be null. |\n| breakClipId | Optional string The break clip's id. Refer to cast.framework.messages.BreakClip.id |\n| breakId | Optional string The break's id. Refer to cast.framework.messages.Break.id |\n\nProperties\n----------\n\n### breakClipId\n\nconstant\n\n(string or undefined)\n\nThe break clip's ID. Refer to cast.framework.messages.BreakClip.id\n\n### breakId\n\nconstant\n\n(string or undefined)\n\nThe break's id. Refer to cast.framework.messages.Break.id\n\n### currentMediaTime\n\nconstant\n\n(number or undefined)\n\nThe time in the currently-playing media when the break event occurred.\nFor the client-side stitched ads, this represents the media time of a\nbreak clip when the event occurred.\n\n### endedReason\n\nconstant\n\n(non-null [cast.framework.events.EndedReason](/cast/docs/reference/web_receiver/cast.framework.events#.EndedReason) or undefined)\n\nThe reason the break clip ended.\n\n### index\n\nconstant\n\n(number or undefined)\n\nIndex of break clip, which starts from 1.\n\n### total\n\nconstant\n\n(number or undefined)\n\nTotal number of break clips.\n\n### whenSkippable\n\nconstant\n\n(number or undefined)\n\nHow long the current break clip must play before the viewer is permitted\nto skip (in seconds)."]]