Constructor
new Stats(elementnon-null)
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLMediaElement |
- Source:
Members
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
(private) getSystemTimeInSeconds_() → {number}
Get the system time in seconds.
- Source:
Returns:
- Type
- number
markEndOfLoad()
Mark the end of the load process. This should only be called after calling
|markStartOfLoad|.
- Source:
markStartOfLoad()
Mark the start of the load process. This call will have no visible effect
until |markEndOfLoad| is called.
- Source:
setBandwidthEstimate(bandwidth)
Parameters:
Name | Type | Description |
---|---|---|
bandwidth |
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:
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:
updateTime(isBuffering)
Add to the time spent playing or buffering based on the time since the
last call to |updateTime|. The value of |isBuffering| will control which
time value is updated. The first call to |updateTime| will not add time.
Parameters:
Name | Type | Description |
---|---|---|
isBuffering |
boolean |
- Source: