Class: shaka.util.StateHistory

Constructor

new StateHistory()

Source:

Members

(private, non-null) closed_ :Array.<shaka.extern.StateChange>

The stats that are "closed" for updating. The "open" state becomes closed once we move to a new state.
Type:
Source:

(private, nullable) open_ :shaka.extern.StateChange

The state that we think is still the current change. It is "open" for updating.
Type:
Source:

Methods

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

Get a copy of each state change entry in the history. A copy of each entry is created to break the reference to the internal data.
Source:
Returns:
Type
Array.<shaka.extern.StateChange>

(private) getNowInSeconds_() → {number}

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

getTimeSpentIn(state) → {number}

Go through all entries in the history and count how much time was spend in the given state.
Parameters:
Name Type Description
state string
Source:
Returns:
Type
number

(private) start_(state)

Parameters:
Name Type Description
state string
Source:

update(state)

Parameters:
Name Type Description
state string
Source:

(private) update_(state)

Parameters:
Name Type Description
state string
Source: