Interface: TrackChoice

  • The cast.framework.stats.TrackChoice interface represents a player's track selection.

  • Key properties include bandwidth (for non-text tracks), whether the choice was due to adaptation, a timestamp, and the track type ('variant' or 'text').

  • The fromAdaptation property indicates if the selection was made by the player's ABR algorithm.

  • The type property specifies if the chosen track is a combined audio/video stream ('variant') or a text track ('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.