Class: shaka.util.SwitchHistory

Constructor

new SwitchHistory()

Source:

Members

(private, nullable) currentText_ :shaka.extern.Stream

Type:
Source:

(private, nullable) currentVariant_ :shaka.extern.Variant

Type:
Source:

(private, non-null) history_ :Array.<shaka.extern.TrackChoice>

Type:
Source:

Methods

(private) clone_(entry) → {shaka.extern.TrackChoice}

Parameters:
Name Type Description
entry shaka.extern.TrackChoice
Source:
Returns:
Type
shaka.extern.TrackChoice

getCopy() → (non-null) {Array.<shaka.extern.TrackChoice>}

Get a copy of the switch history. This will make sure to expose no internal references.
Source:
Returns:
Type
Array.<shaka.extern.TrackChoice>

(private) getNowInSeconds_() → {number}

Get the system time in seconds.
Source:
Returns:
Type
number

updateCurrentText(newText, fromAdaptation)

Update the history to show that we are currently playing |newText|. If we are already playing |newText|, this update will be ignored.
Parameters:
Name Type Description
newText shaka.extern.Stream
fromAdaptation boolean
Source:

updateCurrentVariant(newVariant, fromAdaptation)

Update the history to show that we are currently playing |newVariant|. If we are already playing |newVariant|, this update will be ignored.
Parameters:
Name Type Description
newVariant shaka.extern.Variant
fromAdaptation boolean
Source: