Constructor
new Stats()
Creates a Stats object.
- Source:
Classes
Members
-
(non-null) bandwidthHistory :Array.<!shaka.player.Stats.TimedValue.<number>>
-
Bandwidth history. Each timestamped value is a bandwidth measurement, in bits per second.
Type:
- Array.<!shaka.player.Stats.TimedValue.<number>>
- Source:
-
(non-null) bufferingHistory :Array.<number>
-
Buffering history. Each number is a timestamp when the player entered a buffering state.
Type:
- Array.<number>
- Source:
-
bufferingTime :number
-
Time in buffering state in seconds.
Type:
- number
- Source:
-
decodedFrames :number
-
Number of frames decoded. NaN if not available.
Type:
- number
- Source:
-
droppedFrames :number
-
Number of frames dropped. NaN if not available.
Type:
- number
- Source:
-
estimatedBandwidth :number
-
Estimated bandwidth in bits per second.
Type:
- number
- Source:
-
playbackLatency :number
-
Playback latency in seconds. NaN if autoplay is not used.
Type:
- number
- Source:
-
playTime :number
-
Time in playback state in seconds.
Type:
- number
- Source:
-
(non-null) streamHistory :Array.<!shaka.player.Stats.TimedValue.<!shaka.player.Stats.StreamStats>>
-
StreamInfo history. Each timestamped value is a stream chosen by the player.
Type:
- Source:
-
streamStats :shaka.player.Stats.StreamStats
-
Type:
- Source:
Methods
-
logBandwidth(bandwidth)
-
Logs bandwidth stats.
Parameters:
Name Type Description bandwidth
number in bits per second. - Source:
-
logBufferingEvent()
-
Logs a buffering event.
- Source:
-
logBufferingTime(t)
-
Logs buffering time.
Parameters:
Name Type Description t
number Milliseconds the player has been in a buffering state. - Source:
-
logPlaybackLatency(latency)
-
Logs playback latency.
Parameters:
Name Type Description latency
number in milliseconds. - Source:
-
logPlayTime(t)
-
Logs play time.
Parameters:
Name Type Description t
number Milliseconds the player has been in a playback state. - Source:
-
logStreamChange(streamInfonon-null)
-
Logs a stream change.
Parameters:
Name Type Description streamInfo
shaka.media.StreamInfo - Source:
-
updateVideoStats(video)
-
Updates video stats from the video tag.
Parameters:
Name Type Description video
HTMLVideoElement - Source: