sharu725 / youtube-embed

Embeds a clickable youtube thumbnail instead of the iframe. Upon clicking, loads the iframe.
https://embed.sveltethemes.dev
36 stars 7 forks source link

CORS Error when using Firefox #12

Open eric-nicular opened 1 year ago

eric-nicular commented 1 year ago

When using the component, it appears to work in Chrome and Edge, but Firefox gives a CORS error and does not display the video, giving the following error messages:

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=RlsMpoPqFfs&format=json. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘null’).

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource. "

sanderjson commented 1 year ago

Issue appears only in dev for me. In production URL is resolved.

sharu725 commented 4 months ago

@eric-nicular is this still the case? Can you update the package and see if it is resolved?