# Class: MasterPlaylistController

## MasterPlaylistController()

#### new MasterPlaylistController()

the master playlist controller controller all interactons between playlists and segmentloaders. At this time this mainly involves a master playlist and a series of audio playlists if they are available

Source:
  - master-playlist-controller.js, line 213

### Extends

- videojs.EventTarget

### Methods

#### blacklistCurrentPlaylist(erroropt, blacklistDurationopt)

Blacklists a playlist when an error occurs for a set amount of time making it unavailable for selection by the rendition selection algorithm and then forces a new playlist (rendition) selection.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`error` | Object | <optional> | an optional error that may include the playlist to blacklist
`blacklistDuration` | Number | <optional> | an optional number of seconds to blacklist the playlist

Source:
  - master-playlist-controller.js, line 846

#### bufferLowWaterLine() → {Number}

Calculates the desired buffer low water line based on current time

Source:
  - master-playlist-controller.js, line 1236

##### Returns:

Desired buffer low water line in seconds

Type
  Number

#### dispose()

dispose of the MasterPlaylistController and everything that it controls

Source:
  - master-playlist-controller.js, line 1075

#### duration() → {TimeRange}

get the current duration

Source:
  - master-playlist-controller.js, line 959

##### Returns:

the duration

Type
  TimeRange

#### goalBufferLength() → {Number}

Calculates the desired forward buffer length based on current time

Source:
  - master-playlist-controller.js, line 1222

##### Returns:

Desired forward buffer length in seconds

Type
  Number

#### load()

Call load on our SegmentLoaders

Source:
  - master-playlist-controller.js, line 642

#### master() → {Object}

return the master playlist object if we have one

Source:
  - master-playlist-controller.js, line 1101

##### Returns:

the master playlist object that we parsed

Type
  Object

#### media() → {Object}

return the currently selected playlist

Source:
  - master-playlist-controller.js, line 1110

##### Returns:

the currently selected playlist object that we parsed

Type
  Object

#### pauseLoading()

Pause all segment loaders

Source:
  - master-playlist-controller.js, line 900

#### play()

Begin playback.

Source:
  - master-playlist-controller.js, line 674

#### seekable() → {TimeRange}

check the seekable range

Source:
  - master-playlist-controller.js, line 976

##### Returns:

the seekable range

Type
  TimeRange

#### setCurrentTime(currentTime) → {TimeRange}

set the current time on all segment loaders

##### Parameters:

Name | Type | Description
--- | --- | ---
`currentTime` | TimeRange | the current time to set

Source:
  - master-playlist-controller.js, line 916

##### Returns:

the current time

Type
  TimeRange

#### setupFirstPlay()

Seek to the latest media position if this is a live video and the player and video are loaded and initialized.

Source:
  - master-playlist-controller.js, line 702

#### stuckAtPlaylistEnd_(playlist) → {boolean}

Check if a playlist has stopped being updated

##### Parameters:

Name | Type | Description
--- | --- | ---
`playlist` | Object | the media playlist object

Source:
  - master-playlist-controller.js, line 803

##### Returns:

whether the playlist has stopped being updated or not

Type
  boolean

#### updateDuration()

Update the player duration

Source:
  - master-playlist-controller.js, line 1045