MediaPlayerModel

new MediaPlayerModel()

We use this model as a wrapper/proxy between Settings.js and classes that are using parameters from Settings.js.
In some cases we require additional logic to be applied and the settings might need to be adjusted before being used.

Methods

(inner) _checkMaxPlaybackRate(rate, log) → {number}

Checks the supplied max playback rate is a valid vlaue and within supported limits

Parameters:
NameTypeDescription
ratenumber

Supplied max playback rate

logboolean

wether to shown warning or not

Returns:

corrected max playback rate

Type: 
number

(inner) _checkMinPlaybackRate(rate, log) → {number}

Checks the supplied min playback rate is a valid vlaue and within supported limits

Parameters:
NameTypeDescription
ratenumber

Supplied min playback rate

logboolean

wether to shown warning or not

Returns:

corrected min playback rate

Type: 
number

(inner) getAbrBitrateParameter(field, mediaType)

Returns the min,max or initial bitrate for a specific media type.

Parameters:
NameTypeDescription
fieldstring
mediaTypestring

(inner) getCatchupMaxDrift() → {number}

Returns the maximum drift allowed before applying a seek back to the live edge when the catchup mode is enabled

Returns:
Type: 
number

(inner) getCatchupModeEnabled() → {boolean}

Returns whether the catchup mode is activated via the settings or internally in the PlaybackController

Returns:
Type: 
boolean

(inner) getCatchupPlaybackRates() → {number}

Returns the minimum and maximum playback rates to be used when applying the catchup mechanism
If only one of the min/max values has been set then the other will default to 0 (no playback rate change).

Returns:
Type: 
number

(inner) getInitialBufferLevel() → {number}

Returns the initial buffer level taking the stable buffer time into account

Returns:
Type: 
number

(inner) getRetryAttemptsForType(type) → {number}

Returns the number of retry attempts for a specific media type

Parameters:
NameTypeDescription
type
Returns:
Type: 
number

(inner) getRetryIntervalsForType(type) → {number}

Returns the retry interval for a specific media type

Parameters:
NameTypeDescription
type
Returns:
Type: 
number

(inner) getStableBufferTime() → {number}

Returns the stable buffer time taking the live delay into account

Returns:
Type: 
number