getRequiredTag_(tags, tagName) {
    const tag = shaka.hls.Utils.getFirstTagWithName(tags, tagName);
    if (!tag) {
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.MANIFEST,
          shaka.util.Error.Code.HLS_REQUIRED_TAG_MISSING, tagName);
    }

    return tag;
  }
Returns a tag with a given name.
Throws an error if tag was not found.

@param {!Array<shaka.hls.Tag>} tags
@param {string} tagName
@return {!shaka.hls.Tag}
@private