Skip to content

bug, dynamic update of <source(s)> and <track(s)> seems to be ignored  #481

Description

@belgattitude

Took me a while to figure out, and it's not related to ReactPlayer but good to keep a note.

(update seems to affect Chrome too: play with effect https://soluble.io/react-player/demo/ (click multiple bunny then multiple elephant))

Setting new FilePlayer sources urls or tracks on an already loaded video does not actually reload the <video> url under Firefox (at least Firefox 61 - Ubuntu 18.04). Chrome works as expected does not work neither.

Setting the video url as a string works, I'm referring specifically to multiple sources or tracks like:

<ReactPlayer
  playing
  url={[
    {src: 'foo.webm', type: 'video/webm'},
    {src: 'foo.ogg', type: 'video/ogg'}
  ]},
 config={{ file: {
    tracks: [
      {kind: 'subtitles', src: 'subs/subtitles.en.vtt', srcLang: 'en', default: true},
      {kind: 'subtitles', src: 'subs/subtitles.de.vtt', srcLang: 'de'}
    ]
  }}}
/>

To be sure I does not come from my code, I've updated the demo app.js to include 2 buttons with multiple sources. To reproduce: clone and yarn start https://github.com/belgattitude/react-player.git or see https://github.com/CookPete/react-player/compare/master...belgattitude:test-video-url-change-ignored?expand=1

Changing the source location from Firebug is also affected.

This bug is very annoying in my case, because video are loaded from a list... Props urls are well updated.

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