z
This commit is contained in:
@@ -1,31 +1,44 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>HLS Player Test</title>
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
<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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Live Stream</h1>
|
<h1>Live Stream</h1>
|
||||||
|
<div style="display: flex; justify-content: center;">
|
||||||
<video id="video" width="80%" controls></video>
|
<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>
|
if (Hls.isSupported()) {
|
||||||
var video = document.getElementById('video');
|
var hls = new Hls();
|
||||||
// ** CHANGE THIS URL TO YOUR STREAM URL **
|
hls.loadSource(videoSrc);
|
||||||
var videoSrc = 'https://hls.talldoor.uk/hls/sxlxc.m3u8';
|
hls.attachMedia(video);
|
||||||
|
hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
||||||
if (Hls.isSupported()) {
|
video.play();
|
||||||
var hls = new Hls();
|
});
|
||||||
hls.loadSource(videoSrc);
|
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||||
hls.attachMedia(video);
|
video.src = videoSrc;
|
||||||
hls.on(Hls.Events.MANIFEST_PARSED, function() {
|
video.addEventListener('loadedmetadata', function () {
|
||||||
video.play();
|
video.play();
|
||||||
});
|
});
|
||||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
}
|
||||||
video.src = videoSrc;
|
</script>
|
||||||
video.addEventListener('loadedmetadata', function() {
|
|
||||||
video.play();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Reference in New Issue
Block a user