Click here to Skip to main content
15,881,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<script type="text/javascript" language="javascript">
    video_count = 1;

    function run() {

        video_count++;
        var videoPlayer = document.getElementById("homevideo");
        if (video_count == 4)

            video_count = 1;
        var nextVideo = "videos/accept" + video_count + ".mp4";
        videoPlayer.src = nextVideo;
        var myVar = setInterval(function (), 3000);
        videoPlayer.play(myVar);
    };
       </script>

 <div style="width: 30%;">
           <video id="homevideo" width="100%" controls  onended="run()">
           <source id="ss" src="videos/accept.mp4" type='video/mp4'/></video>
       </div>
Posted
Comments
ZurdoDev 8-Dec-14 13:25pm    
Where are you stuck?
alok0000 8-Dec-14 13:36pm    
Hi Ryan, I wants to play a next video automatically after 24 (60000 * 1 * 60 * 24) hours. How could i do that?
I also wants to change a video source path change directly from folder?
alok0000 9-Dec-14 7:21am    
Please help if anyone knows

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900