# 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 160

### Extends

- videojs.EventTarget

### Methods

#### activeAudioGroup()

Returns the audio group for the currently active primary media playlist.

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

#### blacklistCurrentPlaylist(erroropt)

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

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

#### dispose()

dispose of the MasterPlaylistController and everything that it controls

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

#### duration() → {TimeRange}

get the current duration

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

##### Returns:

the duration

Type
  TimeRange

#### load()

Call load on our SegmentLoaders

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

#### master() → {Object}

return the master playlist object if we have one

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

##### Returns:

the master playlist object that we parsed

Type
  Object

#### media() → {Object}

return the currently selected playlist

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

##### Returns:

the currently selected playlist object that we parsed

Type
  Object

#### pauseLoading()

Pause all segment loaders

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

#### play()

Begin playback.

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

#### seekable() → {TimeRange}

check the seekable range

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

##### 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 789

##### Returns:

the current time

Type
  TimeRange

#### setupAudio()

Determine the correct audio rendition based on the active AudioTrack and initialize a PlaylistLoader and SegmentLoader if necessary. This method is called once automatically before playback begins to enable the default audio track and should be invoked again if the track is changed.

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

#### 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 671

#### updateDuration()

Update the player duration

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