startBufferManagement_(mediaElement, srcEquals) {
    goog.asserts.assert(
        !this.bufferObserver_,
        'No buffering observer should exist before initialization.');

    goog.asserts.assert(
        !this.bufferPoller_,
        'No buffer timer should exist before initialization.');

    // Give dummy values, will be updated below.
    this.bufferObserver_ = new shaka.media.BufferingObserver(1, 2);

    // Force us back to a buffering state. This ensure everything is starting in
    // the same state.
    this.bufferObserver_.setState(shaka.media.BufferingObserver.State.STARVING);
    this.updateBufferingSettings_();
    this.updateBufferState_();

    this.bufferPoller_ = new shaka.util.Timer(() => {
      this.pollBufferState_();
    });
    if (this.config_.streaming.rebufferingGoal) {
      this.bufferPoller_.tickEvery(/* seconds= */ 0.25);
    }
    this.loadEventManager_.listen(mediaElement, 'waiting',
        (e) => this.pollBufferState_());
    this.loadEventManager_.listen(mediaElement, 'canplaythrough',
        (e) => this.pollBufferState_());
    this.loadEventManager_.listen(mediaElement, 'playing',
        (e) => this.pollBufferState_());
    this.loadEventManager_.listen(mediaElement, 'seeked',
        (e) => this.pollBufferState_());
    if (srcEquals) {
      this.loadEventManager_.listen(mediaElement, 'stalled',
          (e) => this.pollBufferState_());
      this.loadEventManager_.listen(mediaElement, 'progress',
          (e) => this.pollBufferState_());
      this.loadEventManager_.listen(mediaElement, 'timeupdate',
          (e) => this.pollBufferState_());
    }
  }
Initialize and start the buffering system (observer and timer) so that we
can monitor our buffer lead during playback.

@param {!HTMLMediaElement} mediaElement
@param {boolean} srcEquals
@private