Skip to content Skip to sidebar Skip to footer

Playing Two Videos In Queue

Solution 1:

You can archieve this by doing:

<video id="homevideo" width="100%" autoplay onended="run()">
    <source src="app/video1.mp4"type='video/mp4'/>
    <source src="app/video2.mp4"type='video/mp4'/>
</video>

video_count =1;
videoPlayer = document.getElementById("homevideo");

functionrun(){
        video_count++;
        if (video_count == 4) video_count = 1;
        var nextVideo = "app/video"+video_count+".mp4";
        videoPlayer.src = nextVideo;
        videoPlayer.play();
   };

Reference

Post a Comment for "Playing Two Videos In Queue"