Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript stop youtube video

<iframe id="myVideoId" src="https://www.youtube.com/embed/Q63qjIXMqwU?enablejsapi=1"></iframe> 
<script>
  	//stop the video playing like so
   document.getElementById("myVideoId").contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*');  
</script>
 
PREVIOUS NEXT
Tagged: #javascript #stop #youtube #video
ADD COMMENT
Topic
Name
1+2 =