How to on click yotube video play in popup

<a href="JavaScript:Void(0);" data-toggle="modal" data-src="" data-target="#testimonial" class="d-block video-link video_btn"><img class="d-block w-100" src="" alt="" width="100%" height="100%" /> /********************************/ ✕ /********************************/ var $videoSrc; $('.video-link').click(function() { $videoSrc = $(this).data( "src" ); }); //console.log($videoSrc); // when the modal is opened autoplay it $('#testimonial').on('shown.bs.modal', function (e) { $("#testimonial_video").attr("src", $videoSrc + "?enablejsapi=1&rel=0&autoplay=1&amp;showinfo=0"); }) // stop playing the youtube video when I close … Continue reading How to on click yotube video play in popup