Play ,Pause and Stop Embedded YouTube Video Iframe
Reference
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
HTML Code
<div><a href="#" class="play-video">Play Video</a></div>
<div><a href="#" class="stop-video">Stop Video</a></div>
<div><a href="#" class="pause-video">Pause Video</a></div>
<iframe width="560" height="315" src="https://www.youtube.com/embed/WWLsLiVYJRU?enablejsapi=1" frameborder="0"
class="youtube-video" allowfullscreen></iframe>
JQuery Code
$('a.play-video').click(function(){
$('.youtube-video')[0].contentWindow.postMessage('{"event":"command","func":"' + 'playVideo' + '","args":""}', '*');
});
$('a.stop-video').click(function(){
$('.youtube-video')[0].contentWindow.postMessage('{"event":"command","func":"' + 'stopVideo' + '","args":""}', '*');
});
$('a.pause-video').click(function(){
$('.youtube-video')[0].contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');
});