Subtitles never loaded with Firefox
See original GitHub issuedear @CookPete
Spent few hours trying to debug why firefox does not display (load) my subtitles, while chrome was doing it right.I would be grateful if you could confirm or help.
Here’s an example:
https://soluble.io/react-player/demo-bugtracks/
The first video is rendered through
<ReactPlayer>
, the secondwith the native <video> tag
. Both are set up to display subtitles. In firefox you’ll see the<ReactPlayer>
version does not show anything.
(code is available: https://github.com/belgattitude/react-player/blob/demo/bug-tracks-firefox/src/demo/App.js#L112 on my branch)
I’ve been thinking about a firefox bug, but I’m not sure… so I wrote a basic video player and it worked quite well:
https://gist.github.com/belgattitude/26d00cbd33df56567845b5a76f265a0b
Can you help ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
FYI, I think the issue is with how react add/remove text tracks… In a prototype I’ve been able to fix the issue by managing tracks through the dom:
If you look to the code below, you’ll see that I’m not relying on render method to add tracks, but do the job in onLoadedMetadata:
@cookpete, I can add this behaviour to react-player. But I’m not sure it’s a nice addition, looks ugly hack and will only be useful for some people. What do you think ?
This seems like a problem with React and/or Firefox, and not really with ReactPlayer. The workarounds are impressive but not something I really want to include in the library, especially if:
You can pass through your own
onLoadedMetadata
via theconfig.file.attributes
prop, so until a fix is found for the root cause of the problem elsewhere, this will have to do.Is it worth opening a ticket with React and/or Firefox to try and gain some more wisdom?