seeked() {
    if (!this.playerInterface_) {
      // Already destroyed.
      return;
    }

    const presentationTime = this.playerInterface_.getPresentationTime();
    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    const newTimeIsBuffered = (type) => {
      return this.playerInterface_.mediaSourceEngine.isBuffered(
          type, presentationTime);
    };

    let streamCleared = false;
    for (const type of this.mediaStates_.keys()) {
      const mediaState = this.mediaStates_.get(type);
      const logPrefix = shaka.media.StreamingEngine.logPrefix_(mediaState);

      if (!newTimeIsBuffered(type)) {
        this.lastMediaSourceReset_ = 0;
        if (mediaState.segmentPrefetch) {
          mediaState.segmentPrefetch.resetPosition();
        }
        if (mediaState.type === ContentType.AUDIO) {
          for (const prefetch of this.audioPrefetchMap_.values()) {
            prefetch.resetPosition();
          }
        }
        mediaState.segmentIterator = null;
        const bufferEnd =
            this.playerInterface_.mediaSourceEngine.bufferEnd(type);
        const somethingBuffered = bufferEnd != null;

        // Don't clear the buffer unless something is buffered.  This extra
        // check prevents extra, useless calls to clear the buffer.
        if (somethingBuffered || mediaState.performingUpdate) {
          this.forceClearBuffer_(mediaState);
          streamCleared = true;
        }

        // If there is an operation in progress, stop it now.
        if (mediaState.operation) {
          mediaState.operation.abort();
          shaka.log.debug(logPrefix, 'Aborting operation due to seek');
          mediaState.operation = null;
        }

        // The pts has shifted from the seek, invalidating captions currently
        // in the text buffer. Thus, clear and reset the caption parser.
        if (type === ContentType.TEXT) {
          this.playerInterface_.mediaSourceEngine.resetCaptionParser();
        }

        // Mark the media state as having seeked, so that the new buffers know
        // that they will need to be at a new position (for sequence mode).
        mediaState.seeked = true;
      }
    }

    const CrossBoundaryStrategy = shaka.config.CrossBoundaryStrategy;
    if (this.config_.crossBoundaryStrategy !== CrossBoundaryStrategy.KEEP) {
      // We might have seeked near a boundary, forward time in case MSE does not
      // recover due to segment misalignment near the boundary.
      this.forwardTimeForCrossBoundary();
    }

    if (!streamCleared) {
      shaka.log.debug(
          '(all): seeked: buffered seek: presentationTime=' + presentationTime);
    }
  }
Notifies the StreamingEngine that the playhead has moved to a valid time
within the presentation timeline.