JSFiddle - React, Tailwind, and code Playground
by Sasá Rafalsky
HTML
<html>
<head>
<meta charset="UTF-8">
<title>Simple Free HLS Player Example</title>
<!-- Include hls.js from a CDN -->
<script src="https://cdn.tutorialjinni.com/hls.js/1.2.1/hls.min.js"></script>
</head>
<body>
<audio id="audioPlayerHtml" src=""></audio>
<script>
if (Hls.isSupported()) {
var audio = document.getElementById('audioPlayerHtml');
var hls = new Hls();
//hls.loadSource('https://cdn.beatfeel.com/audios/streaming/test/test.m3u8');
hls.loadSource('http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8');
hls.attachMedia(audio);
hls.on(Hls.Events.MANIFEST_PARSED, function() {
audio.play();
});
} else {
alert("Cannot stream HLS, use another video source");
}
</script>
</body>
</html>