Last active
March 23, 2018 15:50
-
-
Save robneu/4b6dcf54b4c6c23640dc to your computer and use it in GitHub Desktop.
Embed a YouTube video using featherlight.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="https://www.youtube.com/embed/CEYRBTZWu8U" data-featherlight="iframe" data-featherlight-iframe-width="960" data-featherlight-iframe-height="540"> | |
<img class="alignnone" src="http://img.youtube.com/vi/CEYRBTZWu8U/maxresdefault.jpg" alt="" width="1280" height="720" /> | |
</a> |
I'm pretty sure to embed content from YouTube you need to use the https://www.youtube.com/embed/
version of the video URL.
Thanks!
This works for me. Thanks!
Mine flashes a white blank image quickly then loads the video in the lightbox. But it works!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have used this but it didnot display the video within the popup. I got an error in console Refused to display 'https://www.youtube.com/watch?v=hgfhhgf' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.