getClosedCaptions_(tag, type) {
    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    // The attribute of closed captions is optional, and the value may be
    // 'NONE'.
    const closedCaptionsAttr = tag.getAttributeValue('CLOSED-CAPTIONS');

    // EXT-X-STREAM-INF tags may have CLOSED-CAPTIONS attributes.
    // The value can be either a quoted-string or an enumerated-string with
    // the value NONE. If the value is a quoted-string, it MUST match the
    // value of the GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the
    // Playlist whose TYPE attribute is CLOSED-CAPTIONS.
    if (type == ContentType.VIDEO ) {
      if (this.config_.disableText) {
        this.needsClosedCaptionsDetection_ = false;
        return null;
      }
      if (closedCaptionsAttr) {
        if (closedCaptionsAttr != 'NONE') {
          return this.groupIdToClosedCaptionsMap_.get(closedCaptionsAttr);
        }
        this.needsClosedCaptionsDetection_ = false;
      } else if (!closedCaptionsAttr && this.groupIdToClosedCaptionsMap_.size) {
        for (const key of this.groupIdToClosedCaptionsMap_.keys()) {
          return this.groupIdToClosedCaptionsMap_.get(key);
        }
      }
    }
    return null;
  }
Get the closed captions map information for the EXT-X-STREAM-INF tag, to
create the stream info.
@param {!shaka.hls.Tag} tag
@param {string} type
@return {Map<string, string>} closedCaptions
@private