Answers for "javascript video after play"

0

javascript video after play

<script type="text/javascript">
// Do not name the function "play()"
function playVideo(){
    var video = document.getElementById('video');
    video.play();
    video.addEventListener('ended',function(){
        window.location = 'http://www.google.com';
    });
}
</script>
<video controls id="video" width="770" height="882" onclick="playVideo()">
    <source src="video/Motion.mp4" type="video/mp4" />
</video>
Posted by: Guest on July-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language