static forEachSegment_(stream, startTime, callback) {
    /** @type {?number} */
    let i = stream.segmentIndex.find(startTime);

    if (i == null) {
      return;
    }

    /** @type {?shaka.media.SegmentReference} */
    let ref = stream.segmentIndex.get(i);
    while (ref) {
      callback(ref, i);
      ref = stream.segmentIndex.get(++i);
    }
  }
@param {shaka.extern.Stream} stream
@param {number} startTime
@param {function(!shaka.media.SegmentReference, number)} callback
@private