Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Video not loading in Chrome. Potentially due to CORS issue. #1031
Comments
|
You can temporarily fix the CORS issue by running chrome this way. Localhost is deliberately blocked "C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp |
|
Thanks so much for your reply @itaylorm. I'm also running into this issue when I run the code on our dev server, even though I've followed steps to enable CORS and view permissions on our Amazon s3 bucket. Have you had any experience with this and/or do you have any recommendations on how you might approach fixing this issue? |
|
Your example URL works for me from |
@cookpete I've hit a wall in trying to play .m3u8 videos on Chrome and would appreciate any insights you might have to resolve the issue.
Right now, when users try to view ReactPlayer .m3u8 videos in Chrome (either from localhost or from our qa server), the video does not load. On Safari, the browser console shows CORS errors, but the video still seems to load.
The videos are hosted on s3, and I believe we've removed all privacy permissions related to the videos.
Here is an example video: https://videokits-apps.s3-us-west-1.amazonaws.com/riza/usrYteLEMKdz5Lt8RgTCmMa/Video/fiAo7WNGVzDwH7fcyGnLbe2MSWZ1vxMAa.mov/HLS/fiAo7WNGVzDwH7fcyGnLbe2MSWZ1vxMAa.m3u8
The video plays fine here: https://hls-js.netlify.app/demo/
Here are the console errors when attempting to render the video in Chrome:
Access to XMLHttpRequest at '....m3u8' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
xhr-loader.js:82 GET ... net::ERR_FAILED
Access to XMLHttpRequest at '...' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
logger.js:40 [error] > 0 while loading ...
Thank you so much in advance for your help!!