This commit is contained in:
sxlxc
2025-07-19 18:12:38 +08:00
parent 72c6842238
commit fb9eaefc84

View File

@@ -1,31 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>HLS Player Test</title>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
<title>HLS Player Test</title>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
body {
font-family: "Fira Sans", sans-serif;
font-weight: 400;
font-style: normal;
}
</style>
</head>
<body>
<h1>Live Stream</h1>
<h1>Live Stream</h1>
<div style="display: flex; justify-content: center;">
<video id="video" width="80%" controls></video>
</div>
<script>
var video = document.getElementById('video');
// ** CHANGE THIS URL TO YOUR STREAM URL **
var videoSrc = 'https://hls.talldoor.uk/hls/sxlxc.m3u8';
<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>
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>