Class: shaka.util.Stats

Constructor

new Stats()

Source:

Members

(private) bandwidthEstimate_ :number

Type:
  • number
Source:

(private) height_ :number

Type:
  • number
Source:

(private) licenseTimeSeconds_ :number

Type:
  • number
Source:

(private) loadLatencySeconds_ :number

Type:
  • number
Source:

(private, non-null) stateHistory_ :shaka.util.StateHistory

Type:
Source:

(private, non-null) switchHistory_ :shaka.util.SwitchHistory

Type:
Source:

(private) totalCorruptedFrames_ :number

Type:
  • number
Source:

(private) totalDecodedFrames_ :number

Type:
  • number
Source:

(private) totalDroppedFrames_ :number

Type:
  • number
Source:

(private) variantBandwidth_ :number

Type:
  • number
Source:

(private) width_ :number

Type:
  • number
Source:

Methods

(static) getEmptyBlob() → {shaka.extern.Stats}

Create an empty stats blob. This resembles the stats when we are not playing any content.
Source:
Returns:
Type
shaka.extern.Stats

getBlob() → {shaka.extern.Stats}

Create a stats blob that we can pass up to the app. This blob will not reference any internal data.
Source:
Returns:
Type
shaka.extern.Stats

getStateHistory() → (non-null) {shaka.util.StateHistory}

Source:
Returns:
Type
shaka.util.StateHistory

getSwitchHistory() → (non-null) {shaka.util.SwitchHistory}

Source:
Returns:
Type
shaka.util.SwitchHistory

setBandwidthEstimate(bandwidth)

Parameters:
Name Type Description
bandwidth number
Source:

setCorruptedFrames(corrupted)

Update corrupted frames. This will replace the previous values.
Parameters:
Name Type Description
corrupted number
Source:

setDroppedFrames(dropped, decoded)

Update the ratio of dropped frames to total frames. This will replace the previous values.
Parameters:
Name Type Description
dropped number
decoded number
Source:

setLicenseTime(seconds)

Record the cumulative time spent on license requests during this session.
Parameters:
Name Type Description
seconds number
Source:

setLoadLatency(seconds)

Record the time it took between the user signalling "I want to play this" to "I am now seeing this".
Parameters:
Name Type Description
seconds number
Source:

setResolution(width, height)

Set the width and height of the video we are currently playing.
Parameters:
Name Type Description
width number
height number
Source:

setVariantBandwidth(bandwidth)

Parameters:
Name Type Description
bandwidth number
Source: