How can I cause an HLS (m3u8) video to loop in Safari?
<p>I took an mp4 video, encoded it for HTTP Live Streaming (HLS) using ffmpeg — resulting in a series of myvideo.ts files and a myvideo.m3u8 playlist — and am attempting to play it using the HTML <code>&lt;video&gt;</code> tag in Safari, with the native HLS capabilities of that browser:</p>

<pre><code>&lt;video id="myvideo" src="myvideo.m3u8" loop="loop"&gt;&lt;/video&gt;
</code></pre>

<p>It plays, once. But despite the "loop" attribute in the video tag, it doesn't loop. It stays frozen on the last frame of the video.</p>

<p>If I try to detect the end of the video using an event listener as described here: 
<a href="https://stackoverflow.com/questions/2741493/detect-when-an-html5-video-finishes">Detect when an HTML5 video finishes</a>
… that event never seems to fire. </p>

<p>The "paused" property in javascript (<code>document.getElementById('myvideo').paused</code>) evaluates to false, even after the video has played once and stopped.</p>

<p>How can I get the video to loop in Safari?</p>