new PlaybackStatistics()
Methods
-
addPlaybackListener(PlaybackStatisticsListener)
-
Add a listener for playback statistics events to listener list
Name Type Description PlaybackStatisticsListener
object Name Type Description streamBitrateChanged
callback fired when the bitrate being rendered changes
resolutionChanged
callback fired when the video resolution changes.
-
getAudioChannelConfig(){string}
-
Returns a string of the channel config of the audio currently used in the content
Returns:
Type Description string audio channel configuration -
getBufferedDuration(){number}
-
Returns the amount of content buffered for playback
Returns:
Type Description number seconds of content buffered -
getCodecs(){string}
-
Returns a string of the video followed by the audio codec currently used in the content
Returns:
Type Description string video and audio codecs used in the content -
getResolution(){PlaybackStatistics~resolutionObject}
-
Returns the width and height in pixels, currently being rendered
Returns:
Type Description PlaybackStatistics~resolutionObject resolution being rendered -
getStreamBitrate(){number}
-
Returns the bitrate of content currently being rendered
Returns:
Type Description number bits/s -
removePlaybackListener(PlaybackStatisticsListener)
-
Remove the listener for playback statistics events from listener list
Name Type Description PlaybackStatisticsListener
Object Reference to a listener function that was added previously
-
setPlaybackListener(PlaybackStatisticsListener)
-
Sets listeners to be fired on playback statistics events
Name Type Description PlaybackStatisticsListener
object Name Type Description streamBitrateChanged
callback fired when the bitrate being rendered changes
resolutionChanged
callback fired when the video resolution changes.
Type Definitions
-
resolutionObjectobject
-
An object which defines the resolution of video
Properties:
Name Type Description width
number in pixels
height
number in pixels