constructor(
      startTime, endTime, uris, startByte, endByte, initSegmentReference,
      timestampOffset, appendWindowStart, appendWindowEnd,
      partialReferences = [], tilesLayout = '', tileDuration = null,
      syncTime = null, status = shaka.media.SegmentReference.Status.AVAILABLE,
      aesKey = null, allPartialSegments = false) {
    // A preload hinted Partial Segment has the same startTime and endTime.
    goog.asserts.assert(startTime <= endTime,
        'startTime must be less than or equal to endTime');
    goog.asserts.assert((endByte == null) || (startByte < endByte),
        'startByte must be < endByte');

    /** @type {number} */
    this.startTime = startTime;

    /** @type {number} */
    this.endTime = endTime;

    /**
     * The "true" end time of the segment, without considering the period end
     * time.  This is necessary for thumbnail segments, where timing requires us
     * to know the original segment duration as described in the manifest.
     * @type {number}
     */
    this.trueEndTime = endTime;

    /** @type {function(): !Array<string>} */
    this.getUrisInner = uris;

    /** @const {number} */
    this.startByte = startByte;

    /** @const {?number} */
    this.endByte = endByte;

    /** @type {shaka.media.InitSegmentReference} */
    this.initSegmentReference = initSegmentReference;

    /** @type {number} */
    this.timestampOffset = timestampOffset;

    /** @type {number} */
    this.appendWindowStart = appendWindowStart;

    /** @type {number} */
    this.appendWindowEnd = appendWindowEnd;

    /** @type {!Array<!shaka.media.SegmentReference>} */
    this.partialReferences = partialReferences;

    /** @type {?string} */
    this.tilesLayout = tilesLayout;

    /** @type {?number} */
    this.tileDuration = tileDuration;

    /**
     * A time value, expressed in seconds since 1970, which is used to
     * synchronize between streams.  Both produced and consumed by the HLS
     * parser.  Other components should not need this value.
     *
     * @type {?number}
     */
    this.syncTime = syncTime;

    /** @type {shaka.media.SegmentReference.Status} */
    this.status = status;

    /** @type {boolean} */
    this.preload = false;

    /** @type {boolean} */
    this.independent = true;

    /** @type {boolean} */
    this.byterangeOptimization = false;

    /** @type {?shaka.extern.aesKey} */
    this.aesKey = aesKey;

    /** @type {?shaka.extern.ThumbnailSprite} */
    this.thumbnailSprite = null;

    /** @type {number} */
    this.discontinuitySequence = -1;

    /** @type {boolean} */
    this.allPartialSegments = allPartialSegments;

    /** @type {boolean} */
    this.partial = false;

    /** @type {boolean} */
    this.lastPartial = false;

    for (const partial of this.partialReferences) {
      partial.markAsPartial();
    }
    if (this.allPartialSegments && this.partialReferences.length) {
      const lastPartial =
          this.partialReferences[this.partialReferences.length - 1];
      lastPartial.markAsLastPartial();
    }

    /** @type {?string} */
    this.codecs = null;

    /** @type {?string} */
    this.mimeType = null;

    /** @type {?number} */
    this.bandwidth = null;

    /** @type {BufferSource|null} */
    this.segmentData = null;

    /** @type {boolean} */
    this.removeSegmentDataOnGet = false;
  }
@param {number} startTime The segment's start time in seconds.
@param {number} endTime The segment's end time in seconds.  The segment
  ends the instant before this time, so |endTime| must be strictly greater
  than |startTime|.
@param {function(): !Array<string>} uris
  A function that creates the URIs of the resource containing the segment.
@param {number} startByte The offset from the start of the resource to the
  start of the segment.
@param {?number} endByte The offset from the start of the resource to the
  end of the segment, inclusive.  A value of null indicates that the
  segment extends to the end of the resource.
@param {shaka.media.InitSegmentReference} initSegmentReference
  The segment's initialization segment metadata, or null if the segments
  are self-initializing.
@param {number} timestampOffset
  The amount of time, in seconds, that must be added to the segment's
  internal timestamps to align it to the presentation timeline.
  <br>
  For DASH, this value should equal the Period start time minus the first
  presentation timestamp of the first frame/sample in the Period.  For
  example, for MP4 based streams, this value should equal Period start
  minus the first segment's tfdt box's 'baseMediaDecodeTime' field (after
  it has been converted to seconds).
  <br>
  For HLS, this value should be the start time of the most recent
  discontinuity, or 0 if there is no preceding discontinuity. Only used
  in segments mode.
@param {number} appendWindowStart
  The start of the append window for this reference, relative to the
  presentation.  Any content from before this time will be removed by
  MediaSource.
@param {number} appendWindowEnd
  The end of the append window for this reference, relative to the
  presentation.  Any content from after this time will be removed by
  MediaSource.
@param {!Array<!shaka.media.SegmentReference>=} partialReferences
  A list of SegmentReferences for the partial segments.
@param {?string=} tilesLayout
  The value is a grid-item-dimension consisting of two positive decimal
  integers in the format: column-x-row ('4x3'). It describes the
  arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
@param {?number=} tileDuration
 The explicit duration of an individual tile within the tiles grid.
 If not provided, the duration should be automatically calculated based on
 the duration of the reference.
@param {?number=} syncTime
 A time value, expressed in seconds since 1970, which is used to
 synchronize between streams.  Both produced and consumed by the HLS
 parser.  Other components should not need this value.
@param {shaka.media.SegmentReference.Status=} status
 The segment status is used to indicate that a segment does not exist or is
 not available.
@param {?shaka.extern.aesKey=} aesKey
 The segment's AES-128-CBC full segment encryption key and iv.
@param {boolean=} allPartialSegments
 Indicate if the segment has all partial segments