# 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:
    - streaming/models/MediaPlayerModel.js, line 51

### 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:
    - streaming/models/MediaPlayerModel.js, line 103

  ##### 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:
    - streaming/models/MediaPlayerModel.js, line 80

  ##### 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:
    - streaming/models/MediaPlayerModel.js, line 184

#### <inner> getCatchupMaxDrift()

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

  Source:
    - streaming/models/MediaPlayerModel.js, line 124

  ##### Returns:

  Type
    number

#### <inner> getCatchupModeEnabled()

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

  Source:
    - streaming/models/MediaPlayerModel.js, line 171

  ##### 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:
    - streaming/models/MediaPlayerModel.js, line 142

  ##### Returns:

  Type
    number

#### <inner> getInitialBufferLevel()

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

  Source:
    - streaming/models/MediaPlayerModel.js, line 207

  ##### Returns:

  Type
    number

#### <inner> getRetryAttemptsForType(type)

  Returns the number of retry attempts for a specific media type

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `type` |  |

  Source:
    - streaming/models/MediaPlayerModel.js, line 233

  ##### Returns:

  Type
    number

#### <inner> getRetryIntervalsForType(type)

  Returns the retry interval for a specific media type

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `type` |  |

  Source:
    - streaming/models/MediaPlayerModel.js, line 244

  ##### Returns:

  Type
    number

#### <inner> getStableBufferTime()

  Returns the stable buffer time taking the live delay into account

  Source:
    - streaming/models/MediaPlayerModel.js, line 221

  ##### Returns:

  Type
    number

#### Search results