Class: MediaPlayerModel

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.

Source:

Methods


<inner> _checkMaxPlaybackRate(rate, log)

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

Parameters:
Name Type Description
rate number

Supplied max playback rate

log boolean

wether to shown warning or not

Source:
Returns:

corrected max playback rate

Type
number

<inner> _checkMinPlaybackRate(rate, log)

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

Parameters:
Name Type Description
rate number

Supplied min playback rate

log boolean

wether to shown warning or not

Source:
Returns:

corrected min playback rate

Type
number

<inner> getAbrBitrateParameter(field, mediaType)

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

Parameters:
Name Type Description
field string
mediaType string
Source:

<inner> getCatchupMaxDrift()

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

Source:
Returns:
Type
number

<inner> getCatchupModeEnabled()

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

Source:
Returns:
Type
boolean

<inner> getCatchupPlaybackRates()

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).

Source:
Returns:
Type
number

<inner> getInitialBufferLevel()

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

Source:
Returns:
Type
number

<inner> getRetryAttemptsForType(type)

Returns the number of retry attempts for a specific media type

Parameters:
Name Type Description
type
Source:
Returns:
Type
number

<inner> getRetryIntervalsForType(type)

Returns the retry interval for a specific media type

Parameters:
Name Type Description
type
Source:
Returns:
Type
number

<inner> getStableBufferTime()

Returns the stable buffer time taking the live delay into account

Source:
Returns:
Type
number