Play Youtube or Vimeo Videos On Popup – Modal Video Library

Modal Video Library

In this tutorial I am going to portion awesome jQuery plugin which minister to you to press in the future Youtube / Vimeo videos on popup a Modal Video Library. just few configuration your can comprehensibly gathering videos artiste on any HTML member behind ever your visitor will click upon that member a popup modal will admittance considering video.

Plugin Features:

* Not affected by dom structure.
* Beautiful transition
* Accessible for keyboard navigation and screen readers.
* Rich options for youtube API and Vimeo API

Integrate Youtube or Vimeo Popup video player

Libraries

Include required plugins libraries along following latest jQuery Library.

<!--CSS-->
<link rel="stylesheet" href="modal-video.min.css">
 
<!--JS-->
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<script src="modal-video.min.js"></script>

HTML

Create demos attachment for Vimeo and Youtube video performer and set video id by data-video-id attribute.

<a href="#" class="vimeo-video-player" data-video-id='9515506'>Click to Open Vimeo Video Play</a>
<a href="#" class="youtube-video-player" data-video-id='JGwWNGJdvx8'>Click to Open Youtube Video Play</a>

JS

Finally enable youtube and Vimeo artiste modal upon partner click.

       <script>
            $(function() {  
		$(".vimeo-video-player").modalVideo({channel:'vimeo'});
		$(".youtube-video-player").modalVideo();
            });
	</script>

Leave a Reply