Interface: TrackChoice

  • cast.framework.stats.TrackChoice interface represents a player track selection with properties indicating bandwidth, adaptation source, timestamp, and track type.

  • The bandwidth property applies to chosen tracks, excluding text tracks, while fromAdaptation specifies if the choice was made by the player's algorithm or the application.

  • Timestamp indicates when the state was entered, and type clarifies whether the selected track is a 'variant' (combined audio/video stream) or 'text'.

Properties

bandwidth

number

The bandwidth of the chosen track (null when 'type' is 'text').

fromAdaptation

boolean

The presentation's max segment duration in seconds, or NaN. This is currently only supported while using Shaka. 'true' if this track choice was made by the player's ABR algorithm for adaptation; 'false' if the choice was made by the application.

timestamp

number

The timestamp the state was entered, in seconds since 1970 (i.e. Date.now() / 1000).

type

string

The type of track chosen ('variant' or 'text'). A 'variant' describes a combination of an audio and video stream which could be played together. It's possible to have a video/audio only variant.