javascript - How to add loop multiple HTML5 videos using jquery? -


my requirement have place n number of videos in same place , if 1 video ended next video has start wise....

here have tried 4 videos not starting second video.

could please me

<script> video_count =1; videoplayer = document.getelementbyid("ss"); function run(){         video_count++;         if (video_count == 4) video_count = 1;         var nextvideo = "video"+video_count+".mp4";         videoplayer.src = nextvideo;         videoplayer.play();         }; </script>  <video id="homevideo" width="100%" autoplay onended="run()">     <source id="ss" src="video1.mp4" type='video/mp4'/> </video> 

try remove onended-tag , add javascript event. help?

videoplayer.onended(function(e) {  run(); }; 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -