createInitSegmentReference_(absoluteInitSegmentUris, mapTag, byteRangeTag,
      aesKey, encrypted) {
    let startByte = 0;
    let endByte = null;
    let byterange = mapTag.getAttributeValue('BYTERANGE');
    if (!byterange && byteRangeTag) {
      byterange = byteRangeTag.value;
    }
    // If a BYTERANGE attribute is not specified, the segment consists
    // of the entire resource.
    if (byterange) {
      const blocks = byterange.split('@');
      const byteLength = Number(blocks[0]);
      startByte = Number(blocks[1]);
      endByte = startByte + byteLength - 1;

      if (aesKey) {
        // MAP segment encrypted with method AES, when served with
        // HTTP Range, has the unencrypted size specified in the range.
        // See: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-6.3.6
        const length = (endByte + 1) - startByte;
        if (length % 16) {
          endByte += (16 - (length % 16));
        }
      }
    }

    const initSegmentRef = new shaka.media.InitSegmentReference(
        () => absoluteInitSegmentUris,
        startByte,
        endByte,
        /* mediaQuality= */ null,
        /* timescale= */ null,
        /* segmentData= */ null,
        aesKey,
        encrypted);
    return initSegmentRef;
  }
Create an InitSegmentReference object for the EXT-X-MAP tag in the media
playlist.
@param {!Array<string>} absoluteInitSegmentUris
@param {!shaka.hls.Tag} mapTag EXT-X-MAP
@param {shaka.hls.Tag=} byteRangeTag EXT-X-BYTERANGE
@param {shaka.extern.aesKey=} aesKey
@param {boolean=} encrypted
@return {!shaka.media.InitSegmentReference}
@private