Представляет собой паузу (например, рекламную паузу), включенную в основное видео.
Конструктор
Перерыв
новый Break (id,breakClipIds, позиция)
Параметр
идентификатор
нить
Уникальный идентификатор перерыва.
перерывклипидс
Массив строк
Список идентификаторов клипов-пауз, включенных в эту паузу.
Значение не должно быть нулевым.
позиция
число
Положение этой паузы внутри основного видео.
Характеристики
перерывклипидс
ненулевой Массив строк
Список идентификаторов клипов-пауз, включенных в эту паузу.
продолжительность
(число или неопределенное)
Продолжительность перерыва в секундах.
расширенный
(логическое или неопределенное)
Указывает, расширен ли перерыв на временной шкале. Продолжительность расширенных пауз включается в общую продолжительность воспроизведения. Значение true указывает, что разрыв расширен. Если этот параметр опущен, предполагается, что значение равно false .
идентификатор
нить
Уникальный идентификатор перерыва. Для перерывов поиска идентификатор представляет собой автоматически созданную строку в формате seek-<timestampInMs> .
isEmbedded
(логическое или неопределенное)
Указывает, встроен ли разрыв в основной поток. Если этот параметр опущен, предполагается, что значение равно false .
просматривается
логическое значение
Наблюдался ли перерыв. Это помечается как true , когда начинает играть брейк. Отправитель может изменить цвет маркера индикатора выполнения, соответствующего этому разрыву, как только это поле изменится с false на true , указывая, что пользователь просмотрел разрыв.
позиция
число
Местоположение разрыва внутри основного видео в секундах. -1 представляет позицию в конце основного видео (после ролика) и действует только для сшивки рекламы на стороне клиента. Для сшивки рекламы на стороне сервера требуется точное положение.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-24 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,["cast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).Break \nclass static\n\nRepresents a break (an ad break, for example) included in the main video.\n\nConstructor\n\nBreak\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\nbreakClipIds\n\nnon-null Array of string\n\nA list of break clip IDs included in this break.\n\nduration\n\n(number or undefined)\n\nThe duration of a break in seconds.\n\nexpanded\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\nid\n\nstring\n\nThe unique break ID. For seek breaks, the ID is an autogenerated string\nin a format `seek-\u003ctimestampInMs\u003e`.\n\nisEmbedded\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\nisWatched\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\nposition\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."]]