31 lines
863 B
HTML
31 lines
863 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>HLS Player Test</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Live Stream</h1>
|
|
<video id="video" width="80%" controls></video>
|
|
|
|
<script>
|
|
var video = document.getElementById('video');
|
|
// ** CHANGE THIS URL TO YOUR STREAM URL **
|
|
var videoSrc = 'https://hls.talldoor.uk/hls/sxlxc.m3u8';
|
|
|
|
if (Hls.isSupported()) {
|
|
var hls = new Hls();
|
|
hls.loadSource(videoSrc);
|
|
hls.attachMedia(video);
|
|
hls.on(Hls.Events.MANIFEST_PARSED, function() {
|
|
video.play();
|
|
});
|
|
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
|
video.src = videoSrc;
|
|
video.addEventListener('loadedmetadata', function() {
|
|
video.play();
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |