title: How do I manually loop an html5 video in iOS 4.3/5?
body: <p>I have a video that has certain segments that need to be looped.  My problem is that on iOS 5, after the third time I update <code>videoElem.currentTime</code>, mobile safari stops updating that attribute.</p>
  
  <p>On iOS 4.3, it seems to stop working intermittently.  What is causing <code>currentTime</code> to break and what are some workarounds?</p>
  
  <p>Btw, I've tried setting the <code>currentTime</code> to floats with only one decimal &amp; I've tried to set it to >0.  Neither has yielded any success.</p>
  
  <p>Sample code:</p>
  
  <pre><code>window.setInterval(startTimer, 50); //ms
  
  // function to begin the timer
  var frameNum = 0;
  function startTimer() {
  
    frameNum++;
  
    if (frameNum % 5 === 0)
    {
      console.log(videoElem.currentTime);
    }
  
    if (videoElem.currentTime &gt;= 7) {
      videoElem.currentTime = 1;
      videoElem.play();
    }
  }
  </code></pre>