parseMediaVariables_(tags, uri) {
    const queryParams = new goog.Uri(uri).getQueryData();
    const mediaVariables = new Map();
    for (const variableTag of tags) {
      const name = variableTag.getAttributeValue('NAME');
      const value = variableTag.getAttributeValue('VALUE');
      const queryParam = variableTag.getAttributeValue('QUERYPARAM');
      const mediaImport = variableTag.getAttributeValue('IMPORT');
      if (name && value) {
        if (!mediaVariables.has(name)) {
          mediaVariables.set(name, value);
        }
      }
      if (queryParam) {
        const queryParamValue = queryParams.get(queryParam)[0];
        if (queryParamValue && !mediaVariables.has(queryParamValue)) {
          mediaVariables.set(queryParam, queryParamValue);
        }
      }
      if (mediaImport) {
        const globalValue = this.globalVariables_.get(mediaImport);
        if (globalValue) {
          mediaVariables.set(mediaImport, globalValue);
        }
      }
    }
    return mediaVariables;
  }
Get the variables of each variant tag, and store in a map.
@param {!Array<!shaka.hls.Tag>} tags Variant tags from the playlist.
@param {string} uri Media playlist URI.
@return {!Map<string, string>}
@private