MyBB Community Forums
Youtube embedded video unavailable error - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: Youtube embedded video unavailable error (/thread-227744.html)



Youtube embedded video unavailable error - ILUXA - 2020-05-12

A little tip, if you get youtube "video unavailable" error for some of youtube embedded videos.
Check your /.htaccess file for these lines and remove or comment if any:
#Header set X-Frame-Options "SAMEORIGIN"
#Header set Referrer-Policy "same-origin"

For example, I had error for this video, while others used to work fine,
but after removing "same-origin" line from .htaccess file, it started to work OK.



RE: Youtube embedded video unavailable error - stryderunknown - 2020-08-22

(2020-05-12, 12:21 AM)ILUXA Wrote: A little tip, if you get youtube "video unavailable" error for some of youtube embedded videos.
Check your /.htaccess file for these lines and remove or comment if any:
#Header set X-Frame-Options "SAMEORIGIN"
#Header set Referrer-Policy "same-origin"

For example, I had error for this video, while others used to work fine,
but after removing "same-origin" line from .htaccess file, it started to work OK.

I wouldn't suggest editing it out of the .htaccess, but look more at the video_youtube_embed template to see if the iframe has it's "sandbox" set with allow-same-origin.

e.g.
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/{$id}" frameborder="0" allowfullscreen sandbox="allow-same-origin allow-scripts" rel="noopener external"></iframe>