src is not set when using file
See original GitHub issueCurrent Behavior
When setting URL = a mp4 the video SRC is never set, thus the player never loads. Occasionally when hot reloading kicks in the player will work.
Expected Behavior
setting url="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4"
should work
also tried, url={[{src: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4'}]}
Steps to Reproduce
- create react app
- import import ReactPlayer from ‘react-player/file’; OR import ReactPlayer from ‘react-player’;
- add player
<ReactPlayer url="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4" controls />
Other Information
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
'img-src' was not explicitly set, so 'default-src' is used as a ...
In the example below, I have added img-src 'self' data:; to the start of the meta tag in the index. html file. I...
Read more ><img>: The Image Embed element - HTML - MDN Web Docs
The src attribute is required, and contains the path to the image you want to embed. The alt attribute holds a text description...
Read more >How to Set Up a Content Security Policy (CSP) in 3 Steps
Follow our guide on how to set up a Content Security Policy (CSP) for your website. We'll include common directives for you to...
Read more >How to create a solid and secure Content Security Policy
Step 1: Start with a basic CSP header · default-src : if resources are not defined in the other sections, use this policy...
Read more >Configuring Content Security Policy - Jenkins
The Javadoc Plugin makes Javadoc available for browsing in Jenkins. The default rule set does not allow use of frames in pages served...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep when i remove the strict mode, all works fine. Is there any solution for this issue?
I was facing also this issue (React 18.2.0 - react-player 2.11.0)
Comment (or removing)
<React.StrictMode>
tag is fixing that in development environment (NODE_ENV), it is working in production environment (when app is built) though since<React.StrictMode>
is ignored in production