This requires Font Awesome 5 being installed on your site (but it'd be pretty easy to swap that for any other library as needed).

First add the following jQuery w/e you are including scripts on your site

Next follow the steps below to add the video to your page.

1.    Place the following div container wherever you'd like your video to be located
<div class="youtube-iframe" data-embed=""></div>

2.    Get the video ID from the YouTube URL
https://www.youtube.com/watch?v=dQw4w9WgXcQ

3.     Add the ID to the YouTube div
<div class="youtube-iframe" data-embed="dQw4w9WgXcQ"></div>

extra: here's some CSS to help get you started


Example:

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.