excludeIncompatibleVariants_(media) {
    let master = this.masterPlaylistLoader_.master;
    let codecCount = 2;
    let videoCodec = null;
    let audioProfile = null;
    let codecs;

    if (media.attributes && media.attributes.CODECS) {
      codecs = parseCodecs(media.attributes.CODECS);
      videoCodec = codecs.videoCodec;
      audioProfile = codecs.audioProfile;
      codecCount = codecs.codecCount;
    }
    master.playlists.forEach(function(variant) {
      let variantCodecs = {
        codecCount: 2,
        videoCodec: null,
        audioProfile: null
      };

      if (variant.attributes && variant.attributes.CODECS) {
        variantCodecs = parseCodecs(variant.attributes.CODECS);
      }

      // if the streams differ in the presence or absence of audio or
      // video, they are incompatible
      if (variantCodecs.codecCount !== codecCount) {
        variant.excludeUntil = Infinity;
      }

      // if h.264 is specified on the current playlist, some flavor of
      // it must be specified on all compatible variants
      if (variantCodecs.videoCodec !== videoCodec) {
        variant.excludeUntil = Infinity;
      }
      // HE-AAC ("mp4a.40.5") is incompatible with all other versions of
      // AAC audio in Chrome 46. Don't mix the two.
      if ((variantCodecs.audioProfile === '5' && audioProfile !== '5') ||
          (audioProfile === '5' && variantCodecs.audioProfile !== '5')) {
        variant.excludeUntil = Infinity;
      }
    });
  }
/**
   * Blacklist playlists that are known to be codec or
   * stream-incompatible with the SourceBuffer configuration. For
   * instance, Media Source Extensions would cause the video element to
   * stall waiting for video data if you switched from a variant with
   * video and audio to an audio-only one.
   *
   * @param {Object} media a media playlist compatible with the current
   * set of SourceBuffers. Variants in the current master playlist that
   * do not appear to have compatible codec or stream configurations
   * will be excluded from the default playlist selection algorithm
   * indefinitely.
   * @private
   */
Blacklist playlists that are known to be codec or
stream-incompatible with the SourceBuffer configuration. For
instance, Media Source Extensions would cause the video element to
stall waiting for video data if you switched from a variant with
video and audio to an audio-only one.

@param {Object} media a media playlist compatible with the current
set of SourceBuffers. Variants in the current master playlist that
do not appear to have compatible codec or stream configurations
will be excluded from the default playlist selection algorithm
indefinitely.
@private
Blacklist playlists that are known to be codec or stream - incompatible with the SourceBuffer configuration . For instance Media Source Extensions would cause the video element to stall waiting for video data if you switched from a variant with video and audio to an audio - only one . @param { Object } media a media playlist compatible with the current set of SourceBuffers . Variants in the current master playlist that do not appear to have compatible codec or stream configurations will be excluded from the default playlist selection algorithm indefinitely . @private
excludeIncompatibleVariants_(media) {
    let master = this.masterPlaylistLoader_.master;
    let codecCount = 2;
    let videoCodec = null;
    let audioProfile = null;
    let codecs;
    if (media.attributes && media.attributes.CODECS) {
      codecs = parseCodecs(media.attributes.CODECS);
      videoCodec = codecs.videoCodec;
      audioProfile = codecs.audioProfile;
      codecCount = codecs.codecCount;
    }
    master.playlists.forEach(function(variant) {
      let variantCodecs = {
        codecCount: 2,
        videoCodec: null,
        audioProfile: null
      };
      if (variant.attributes && variant.attributes.CODECS) {
        variantCodecs = parseCodecs(variant.attributes.CODECS);
      }
      if (variantCodecs.codecCount !== codecCount) {
        variant.excludeUntil = Infinity;
      }
      if (variantCodecs.videoCodec !== videoCodec) {
        variant.excludeUntil = Infinity;
      }
      if ((variantCodecs.audioProfile === '5' && audioProfile !== '5') ||
          (audioProfile === '5' && variantCodecs.audioProfile !== '5')) {
        variant.excludeUntil = Infinity;
      }
    });
  }
excludeIncompatibleVariants_ ( media ) { let master = this . masterPlaylistLoader_ . master ; let codecCount = 2 ; let videoCodec = null ; let audioProfile = null ; let codecs ; if ( media . attributes && media . attributes . CODECS ) { codecs = parseCodecs ( media . attributes . CODECS ) ; videoCodec = codecs . videoCodec ; audioProfile = codecs . audioProfile ; codecCount = codecs . codecCount ; } master . playlists . forEach ( function ( variant ) { let variantCodecs = { codecCount : 2 , videoCodec : null , audioProfile : null } ; if ( variant . attributes && variant . attributes . CODECS ) { variantCodecs = parseCodecs ( variant . attributes . CODECS ) ; } if ( variantCodecs . codecCount !== codecCount ) { variant . excludeUntil = Infinity ; } if ( variantCodecs . videoCodec !== videoCodec ) { variant . excludeUntil = Infinity ; } if ( ( variantCodecs . audioProfile === '5' && audioProfile !== '5' ) || ( audioProfile === '5' && variantCodecs . audioProfile !== '5' ) ) { variant . excludeUntil = Infinity ; } } ) ; }
Blacklist playlists that are known to be codec or
 stream-incompatible with the SourceBuffer configuration.
Blacklist playlists that are known to be codec or stream - incompatible with the SourceBuffer configuration .
// if the streams differ in the presence or absence of audio or // video, they are incompatible // if h.264 is specified on the current playlist, some flavor of // it must be specified on all compatible variants // HE-AAC ("mp4a.40.5") is incompatible with all other versions of // AAC audio in Chrome 46. Don't mix the two.