createStreamingEngine() {
    goog.asserts.assert(
        this.abrManager_ && this.mediaSourceEngine_ && this.manifest_ &&
        this.video_,
        'Must not be destroyed');

    /** @type {shaka.media.StreamingEngine.PlayerInterface} */
    const playerInterface = {
      getPresentationTime: () => this.playhead_ ? this.playhead_.getTime() : 0,
      getBandwidthEstimate: () => this.abrManager_.getBandwidthEstimate(),
      getPlaybackRate: () => this.getPlaybackRate(),
      video: this.video_,
      mediaSourceEngine: this.mediaSourceEngine_,
      netEngine: this.networkingEngine_,
      onError: (error) => this.onError_(error),
      onEvent: (event) => this.dispatchEvent(event),
      onSegmentAppended: (reference, stream, isMuxed) => {
        this.onSegmentAppended_(
            reference.startTime, reference.endTime, stream.type, isMuxed);
      },
      onInitSegmentAppended: (position, initSegment) => {
        const mediaQuality = initSegment.getMediaQuality();
        if (mediaQuality && this.qualityObserver_) {
          this.qualityObserver_.addMediaQualityChange(mediaQuality, position);
        }
      },
      beforeAppendSegment: (contentType, segment) => {
        return this.drmEngine_.parseInbandPssh(contentType, segment);
      },
      disableStream: (stream, time) => this.disableStream(stream, time),
    };

    return new shaka.media.StreamingEngine(this.manifest_, playerInterface);
  }
Creates a new instance of StreamingEngine.  This can be replaced by tests
to create fake instances instead.

@return {!shaka.media.StreamingEngine}