YouTube integration throws XMLHttpRequest CORS policy errors
RickR2H opened this issue · comments
The YouTube video is loaded but there are console errors.
Issue description:
Chrome Console Errors:
Access to XMLHttpRequest at 'https://googleads.g.doubleclick.net/pagead/id' from origin 'https://www.youtube-nocookie.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Failed to load resource: net::ERR_FAILED
Version used:
Version : 1.12.5 via CDN
Code to reproduce the issue (HTML blocks + JavaScript initialization)
This is the default example integration via data-attributes
<!-- Background YouTube Parallax -->
<div class="jarallax" data-jarallax-video="https://www.youtube.com/watch?v=ab0TSkLe-E0">
Your content here...
</div>
I hope you can help...
Hey. We changed the Youtube URL to youtube-nocookie.com for GDPR compliance. And looks like it is conflicting with google ads.
I think you will need to use the 1.12.4 Jarallax version to prevent such errors.
@nk-o Thanks for the feedback! I'll try that first.
I'm seeing the same error and have Jarallax version 1.0.1 on my site (which I know should be upgraded; it came with my Bootstrap theme).
It also seems to happen for the YouTube section of the Jarallax demo site: https://free.nkdev.info/jarallax/
Any ideas on how to fix?
Can confirm I'm also seeing this on 1.12.2 and 1.12.4
For context, it appears youtube has broken a lot of embed codes so that might be related?
I am facing same problem but my website on Wordpress actually when, I am using Youtube video in my post then the error Show on Google search console "Access to XMLHttpRequest at 'https://googleads.g.doubleclick.net/pagead/id' from origin 'https://www.youtube.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."