react-youtube
react-youtube copied to clipboard
CORS error
Hello.
I've faced up with cors error during local development. Should it work if my domain is localhost
?
I'm also getting this error, I'm unsure when it was introduced since this is my first time using it.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost:3000').
It should be using //www,youtube.com
without the https:
to prevent this.
This is something that the YouTube IFrame Player API does by itself and we don't have control over it.
Same error here, using React 18.1 and Next JS 12.1. I also tried setting origin as localhost:3000 and enablejsapi: 1 in opts
, but no dice. Same error.
Also facing this, just updated to React 18 and nextjs 12.1.
This started happening after the update. Did YouTube IFrame Player API
change recently to enforce this to your knowledge @ruisaraiva19?
Also facing this, just updated to React and nextjs 12.1. This started happening after the update. Did
YouTube IFrame Player API
change recently to enforce this to your knowledge @ruisaraiva19?
@iamgoddog Not that I'm aware of.
Same error
Same error, and I also solved by rollbacking to react 17 :(
env localhost react 17.02 Mozilla 100
When investigating in console, all request are 200 but error CROS ORIGIN
I hope it works in my peronal project online : / ...
Got the same issue but a little bit different. The video player gets displayed for a short amount of time but then gets removed from the DOM.
The video player gets displayed for a short amount of time but then hide this
The video player gets displayed for a short amount of time but then hide this
@Minhaj-T which version of React are you using?
Same issue
I'm also getting this error.
For me it was working until today and suddenly this. Anyone got a solution??
Got the same issue but a little bit different. The video player gets displayed for a short amount of time but then gets removed from the DOM.
I'm getting the same behaviour, using Nextjs 14. Did you find a solution?