Class: Break

  • The chrome.cast.media.Break class represents an ad break or similar interruption within a main video stream.

  • Breaks are identified by a unique ID and contain a list of break clip IDs, along with their position in the main video.

  • Key properties of a Break include its duration, whether it's embedded within the stream, and if it has been watched by the user.

  • Developers can use the Break object to manage and track breaks within their Cast-enabled applications.

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

List of break clip IDs included in this break.

duration

(number or undefined)

Duration of break in seconds.

id

string

Unique ID of a break.

isEmbedded

(boolean or undefined)

Indicates whether the break is embedded in the main stream.

isWatched

boolean

Whether a break was watched. This is marked as true when the break begins to play. A sender can change color of a progress bar marker corresponding to this break once this field changes from false to true denoting that the end-user already watched this break.

position

number

Location of the break inside the main video. -1 represents the end of the main video in seconds.