Using a small script, you can open Youtube or Vimeo videos in a popup when you click on a Button / Image / Blurb module or on other regular links. 

First, add this script to Divi > Theme Options > Integrations > Head:

<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('a.video-popup, .video-popup a').magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});
})(jQuery);
</script>

<link rel="stylesheet" href="/wp-content/themes/Divi/includes/builder/styles/magnific_popup.css" type="text/css" media="all">


Next, add a Button or Image module to the page. 

In the content settings of the module, add the URL of the Youtube or Vimeo video, for example:

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

Note: Popup won't work with the Module Link option. In case you are using the Blurb module, you will need to add link to Title Link URL field.

In Advanced settings of the module add the custom CSS class:

video-popup

Next, disable the following option to load the library required for the popup:

That's it! Save the page and test the module on front end.

Did this answer your question?