getSafeSeekRangeStart(offset) {
    // The earliest known segment time, ignoring segment availability duration.
    const earliestSegmentTime =
        Math.max(this.minSegmentStartTime_, this.userSeekStart_);

    // For VOD, the offset and end time are ignored, and we just return the
    // earliest segment time.  All segments are "safe" in VOD.  However, we
    // should round up to the nearest millisecond to avoid issues like
    // https://github.com/shaka-project/shaka-player/issues/2831, in which we
    // tried to seek repeatedly to catch up to the seek range, and never
    // actually "arrived" within it.  The video's currentTime is not as
    // accurate as the JS number representing the earliest segment time for
    // some content.
    if (this.segmentAvailabilityDuration_ == Infinity) {
      return Math.ceil(earliestSegmentTime * 1e3) / 1e3;
    }

    // AKA the live edge for live streams.
    const availabilityEnd = this.getSegmentAvailabilityEnd();

    // The ideal availability start, not considering known segments.
    const availabilityStart =
        availabilityEnd - this.segmentAvailabilityDuration_;

    // Add the offset to the availability start to ensure that we don't fall
    // outside the availability window while we buffer; we don't need to add the
    // offset to earliestSegmentTime since that won't change over time.
    // Also see: https://github.com/shaka-project/shaka-player/issues/692
    const desiredStart =
        Math.min(availabilityStart + offset, this.getSeekRangeEnd());
    return Math.max(earliestSegmentTime, desiredStart);
  }
Gets the seek range start time, offset by the given amount.  This is used
to ensure that we don't "fall" back out of the seek window while we are
buffering.

@param {number} offset The offset to add to the start time for live
  streams.
@return {number} The current seek start time, in seconds, relative to the
  start of the presentation.
@export