Reputation: 1222
I'm trying to insert a Youtube video on a website for a school project, however, doing some test, I discovered an error on my browser's debugger, as well as the video is not showing of the website
'Load denied by X-Frame-Options: https://www.youtube.com/watch?v=k2v7k-wAm2E does not permit cross-origin framing.'
I looked at my HTML code, and it doesn't seem like anything is wrong with it, even I cheked if the video has the 'embed' part on it
<iframe width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY"></iframe>
So, what could it be?
Upvotes: 0
Views: 690
Reputation: 637
You cab use X-Frame-Bypass( https://github.com/niutech/x-frame-bypass ) to solve the issue. Code:
<script type="module" src="https://unpkg.com/x-frame-bypass"></script>
<iframe is="x-frame-bypass" width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY"></iframe>
Upvotes: 2