I'm trying to loop a section of HTML video using jQuery, in particular, when the video reaches 7 seconds, I want it to loop back to 0. I can't cut the actual video to seven seconds and use the 'loop' function within the video tag as firefox and mobile safari don't support it.
The reason i need it to loop back to 0 is because we're streaming the looped video to Apple TV via AirPlay. I can get it to loop on the iPhone (Mobile Safari) but when it reaches the 'end' of the video, AirPlay stops. I want to trick the browser into playing indefinitely by never reaching the end.
Any Ideas?
<script type="text/javascript">
// Script to loop back to back to 0 when it reaches 7 seconds
</script>
...
<video id="myVideo" controls="controls" loop="loop"><source src="video.m4v" type="video/mp4" x-webkit-airplay="allow" /></video>