Download video.js and include it in your page:
<video-js id=example-video width=960 height=540 class="vjs-default-skin" controls>
<source
src="https://example.com/index.m3u8"
type="application/x-mpegURL">
</video-js>
<script src="video.js"></script>
<script>
var player = videojs('example-video');
player.play();
</script>
Or just check out the source of this page!