Skip to content

on URL changes, this buffer issue #892

Description

@billalaashraf

#736 ## Current Behavior

So when i change the url property fo the react player, it present me with this error, url are .m3u8 files. what is best way to do it.

InvalidStateError: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source.
e._checkBuffer
./src/controller/stream-controller.js:1371:33
  1368 | 
  1369 | const currentTime = media.currentTime;
  1370 | const mediaBuffer = this.mediaBuffer ? this.mediaBuffer : media;
> 1371 | const buffered = mediaBuffer.buffered;
       |                             ^  1372 | 
  1373 | if (!this.loadedmetadata && buffered.length) {
  1374 |   this.loadedmetadata = true;
View compiled
e.doTick
./src/controller/stream-controller.js:164:9
  161 |     break;
  162 |   }
  163 |   // check buffer
> 164 |   this._checkBuffer();
      |       ^  165 |   // check/update current fragment
  166 |   this._checkFragmentChanged();
  167 | }
View compiled
e.tick
./src/task-loop.js:109:11
  106 | tick () {
  107 |   this._tickCallCount++;
  108 |   if (this._tickCallCount === 1) {
> 109 |     this.doTick();
      |         ^  110 |     // re-entrant call to tick from previous doTick call stack
  111 |     // -> schedule a call on the next main loop iteration to process this task processing request
  112 |     if (this._tickCallCount > 1) {
View compiled
sentryWrapped
src/helpers.ts:85
  82 |   // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
  83 |   //       means the sentry.javascript SDK caught an error invoking your application code. This
  84 |   //       is expected behavior and NOT indicative of a bug with sentry.javascript.
> 85 |   return fn.apply(this, wrappedArguments);
     | ^  86 |   // tslint:enable:no-unsafe-any
  87 | } catch (ex) {
  88 |   ignoreNextOnError();
View compiled

Expected Behavior

The Url does change but it present this error.

Steps to Reproduce

  1. Setup the player with .m3u8 Url
  2. While playing, change the Url to any other .m3u8

Environment

Other Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions