blacklistCurrentPlaylist(error = {}) {
    let currentPlaylist;
    let nextPlaylist;

    // If the `error` was generated by the playlist loader, it will contain
    // the playlist we were trying to load (but failed) and that should be
    // blacklisted instead of the currently selected playlist which is likely
    // out-of-date in this scenario
    currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();

    // If there is no current playlist, then an error occurred while we were
    // trying to load the master OR while we were disposing of the tech
    if (!currentPlaylist) {
      this.error = error;
      return this.mediaSource.endOfStream('network');
    }

    // Blacklist this playlist
    currentPlaylist.excludeUntil = Date.now() + BLACKLIST_DURATION;

    // Select a new playlist
    nextPlaylist = this.selectPlaylist();

    if (nextPlaylist) {
      videojs.log.warn('Problem encountered with the current ' +
                       'HLS playlist. Switching to another playlist.');

      return this.masterPlaylistLoader_.media(nextPlaylist);
    }
    videojs.log.warn('Problem encountered with the current ' +
                     'HLS playlist. No suitable alternatives found.');
    // We have no more playlists we can select so we must fail
    this.error = error;
    return this.mediaSource.endOfStream('network');
  }
/**
   * 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.
   *
   * @param {Object=} error an optional error that may include the playlist
   * to blacklist
   */
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.

@param {Object=} error an optional error that may include the playlist
to blacklist
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 . @param { Object = } error an optional error that may include the playlist to blacklist
blacklistCurrentPlaylist(error = {}) {
    let currentPlaylist;
    let nextPlaylist;
    currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();
    if (!currentPlaylist) {
      this.error = error;
      return this.mediaSource.endOfStream('network');
    }
    currentPlaylist.excludeUntil = Date.now() + BLACKLIST_DURATION;
    nextPlaylist = this.selectPlaylist();
    if (nextPlaylist) {
      videojs.log.warn('Problem encountered with the current ' +
                       'HLS playlist. Switching to another playlist.');
      return this.masterPlaylistLoader_.media(nextPlaylist);
    }
    videojs.log.warn('Problem encountered with the current ' +
                     'HLS playlist. No suitable alternatives found.');
    this.error = error;
    return this.mediaSource.endOfStream('network');
  }
blacklistCurrentPlaylist ( error = { } ) { let currentPlaylist ; let nextPlaylist ; currentPlaylist = error . playlist || this . masterPlaylistLoader_ . media ( ) ; if ( ! currentPlaylist ) { this . error = error ; return this . mediaSource . endOfStream ( 'network' ) ; } currentPlaylist . excludeUntil = Date . now ( ) + BLACKLIST_DURATION ; nextPlaylist = this . selectPlaylist ( ) ; if ( nextPlaylist ) { videojs . log . warn ( 'Problem encountered with the current ' + 'HLS playlist. Switching to another playlist.' ) ; return this . masterPlaylistLoader_ . media ( nextPlaylist ) ; } videojs . log . warn ( 'Problem encountered with the current ' + 'HLS playlist. No suitable alternatives found.' ) ; this . error = error ; return this . mediaSource . endOfStream ( 'network' ) ; }
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.
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 .
// If the `error` was generated by the playlist loader, it will contain // the playlist we were trying to load (but failed) and that should be // blacklisted instead of the currently selected playlist which is likely // out-of-date in this scenario // If there is no current playlist, then an error occurred while we were // trying to load the master OR while we were disposing of the tech // Blacklist this playlist // Select a new playlist // We have no more playlists we can select so we must fail