OpenTV Player Web HTML5

Class: PlaybackStatistics

PlaybackStatistics

Provides statistics on content playback, and listeners which provide playback info. Objects of this class are instantiated by OtvToolkit, and should not be instantiated directly. The statistics available will depend on the type of content being played.

new PlaybackStatistics()

Methods

getBufferedDuration(){number}

Returns the amount of content buffered for playback

Returns:
Type Description
number seconds of content buffered

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

reset()

Resets the playback statistics

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

Type Definitions

resolutionObjectobject

An object which defines the resolution of video

Properties:
Name Type Description
width number

in pixels

height number

in pixels