clampSeekToDuration_(time) {
    const duration = this.timeline_.getDuration();
    if (time >= duration) {
      goog.asserts.assert(this.config_.durationBackoff >= 0,
          'Duration backoff must be non-negative!');
      return duration - this.config_.durationBackoff;
    }
    return time;
  }
Clamp seek times and playback start times so that we never seek to the
presentation duration.  Seeking to or starting at duration does not work
consistently across browsers.

@see https://github.com/shaka-project/shaka-player/issues/979
@param {number} time
@return {number} The adjusted seek time.
@private