JavaScript: How to Play YouTube Videos with Fancybox & Google Chrome

Google Chrome I’ve learned is not the most pleasant browser to work with when getting videos to play. Playing videos with HTML5 or simply working with plugins such as Fancybox to play YouTube videos in the pop-up.

Take your standard YouTube video link that looks like this:

https://www.youtube.com/watch?v=m_uBdbErgYg

To use it correctly with Fancybox, you have to replace “watch?v=” with “embed/” and only then will it work:

https://www.youtube.com/embed/m_uBdbErgYg

That’s all you need to do to prevent the empty pop-up window.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.