src/source-updater.js
/**
   * dispose of the source updater and the underlying sourceBuffer
   */
dispose of the source updater and the underlying sourceBuffer
dispose of the source updater and the underlying sourceBuffer
dispose() {
    const disposeFn = () => {
      if (this.sourceBuffer_ && this.mediaSource.readyState === 'open') {
        this.sourceBuffer_.abort();
      }
      this.sourceBuffer_.removeEventListener('updateend', disposeFn);
    };
    this.sourceBuffer_.removeEventListener('updateend', this.onUpdateendCallback_);
    if (this.sourceBuffer_.removing) {
      this.sourceBuffer_.addEventListener('updateend', disposeFn);
    } else {
      disposeFn();
    }
  }
dispose ( ) { const disposeFn = ( ) => { if ( this . sourceBuffer_ && this . mediaSource . readyState === 'open' ) { this . sourceBuffer_ . abort ( ) ; } this . sourceBuffer_ . removeEventListener ( 'updateend' , disposeFn ) ; } ; this . sourceBuffer_ . removeEventListener ( 'updateend' , this . onUpdateendCallback_ ) ; if ( this . sourceBuffer_ . removing ) { this . sourceBuffer_ . addEventListener ( 'updateend' , disposeFn ) ; } else { disposeFn ( ) ; } }
dispose of the source updater and the underlying sourceBuffer
dispose of the source updater and the underlying sourceBuffer