Represents a break (an ad break, for example) included in the main video.
Constructor
Break
new
Break(id, breakClipIds, position)
Parameter
id
string
Unique ID of a break.
breakClipIds
Array of string
List of break clip IDs included in
this break.
Value must not be null.
position
number
Position of this break inside the main video.
Properties
breakClipIds
non-null Array of string
A list of break clip IDs included in this break.
duration
(number or undefined)
The duration of a break in seconds.
expanded
(boolean or undefined)
Indicates whether the break is expanded on the timeline.
The duration of expanded breaks is included in the total playback
duration. A value oftrueindicates that the break is expanded. When
omitted, the value is assumed to befalse.
id
string
The unique break ID. For seek breaks, the ID is an autogenerated string
in a formatseek-<timestampInMs>.
isEmbedded
(boolean or undefined)
Indicates whether the break is embedded in the main stream. When omitted,
the value is assumed to befalse.
isWatched
boolean
Whether a break was watched. This is marked astruewhen the break
begins to play. A sender can change the color of a progress bar marker
corresponding to this break once this field changes fromfalsetotrue, indicating that the user has viewed the break.
position
number
The location of the break inside the main video in seconds.-1represents the position at the end of the main video (post-roll) and is
only valid for the client-side ad stitching. For the server-side ad
stitching, an exact position is required.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecast.framework.messages.Break\u003c/code\u003e class represents a break, such as an ad break, within a main video and includes properties like ID, duration, and position.\u003c/p\u003e\n"],["\u003cp\u003eBreaks can contain multiple break clips, indicated by their IDs in the \u003ccode\u003ebreakClipIds\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eBreaks have a \u003ccode\u003eposition\u003c/code\u003e property defining their location in the main video, with \u003ccode\u003e-1\u003c/code\u003e signifying a post-roll position.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisWatched\u003c/code\u003e property indicates whether a break has been viewed, allowing senders to visually distinguish watched breaks.\u003c/p\u003e\n"],["\u003cp\u003eBreaks can be expanded on the timeline using the \u003ccode\u003eexpanded\u003c/code\u003e property, affecting total playback duration calculation.\u003c/p\u003e\n"]]],["The `Break` class represents an ad break within a video. Key properties include: `id` (unique break identifier), `breakClipIds` (list of clips within the break), and `position` (break's location in the main video). Other properties are `duration`, `expanded` (whether break duration is in total), `isEmbedded` (if embedded in the main stream), and `isWatched` (if the break has started playing). Position of -1 indicates a post-roll, and it is valid only for the client-side ad stitching.\n"],null,["# Class: Break\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).Break\n==============================================================================================================================================\n\nclass static\n\nRepresents a break (an ad break, for example) included in the main video.\n\nConstructor\n-----------\n\n### Break\n\nnew\nBreak(id, breakClipIds, position)\n\n| #### Parameter ||\n|--------------|----------------------------------------------------------------------------------------|\n| id | string Unique ID of a break. |\n| breakClipIds | Array of string List of break clip IDs included in this break. Value must not be null. |\n| position | number Position of this break inside the main video. |\n\nProperties\n----------\n\n### breakClipIds\n\nnon-null Array of string\n\nA list of break clip IDs included in this break.\n\n### duration\n\n(number or undefined)\n\nThe duration of a break in seconds.\n\n### expanded\n\n(boolean or undefined)\n\nIndicates whether the break is expanded on the timeline.\nThe duration of expanded breaks is included in the total playback\nduration. A value of `true` indicates that the break is expanded. When\nomitted, the value is assumed to be `false`.\n\n### id\n\nstring\n\nThe unique break ID. For seek breaks, the ID is an autogenerated string\nin a format `seek-\u003ctimestampInMs\u003e`.\n\n### isEmbedded\n\n(boolean or undefined)\n\nIndicates whether the break is embedded in the main stream. When omitted,\nthe value is assumed to be `false`.\n\n### isWatched\n\nboolean\n\nWhether a break was watched. This is marked as `true` when the break\nbegins to play. A sender can change the color of a progress bar marker\ncorresponding to this break once this field changes from `false` to\n`true`, indicating that the user has viewed the break.\n\n### position\n\nnumber\n\nThe location of the break inside the main video in seconds. `-1`\nrepresents the position at the end of the main video (post-roll) and is\nonly valid for the client-side ad stitching. For the server-side ad\nstitching, an exact position is required."]]