title: video list autoplay then loop again from begin
body: <p>I get code to create Html Video playlist,
  code =&gt;</p>
  <pre><code>&lt;video id=&quot;myVideo&quot; controls autoplay&gt;
      &lt;source src=&quot;upload/video/1.mp4&quot; id=&quot;mp4Source&quot; type=&quot;video/mp4&quot;&gt;
      &lt;source src=&quot;upload/video/2.mp4&quot; id=&quot;mp4Source&quot; type=&quot;video/mp4&quot;&gt;
  &lt;/video&gt;
  
  &lt;script type='text/javascript'&gt;
     var count=1;
     var player=document.getElementById('myVideo');
     var mp4Vid = document.getElementById('mp4Source');
     player.addEventListener('ended',myHandler,false);
  
     function myHandler(e)
     {
    // How to Looping video play list -----
  
        if(!e) 
        {
           e = window.event; 
        }
        count++;
        $(mp4Vid).attr('src', &quot;video/video&quot;+count+&quot;.mp4&quot;);
        player.load();
        player.play();
     }
  
  &lt;/script&gt;
  </code></pre>
  <p>This code can load and autoplay video list very well ( play video 1, then play video 2, then return loop playing  video 2). But can't looping video from start again ( video 1 ).</p>
  <p>Question =&gt; &quot; How to create video list autoplay (video1, video2, ... ,last video) and then looping from start again&quot;</p>
  <p>Thank's for help...</p>