59 lines
2.1 KiB
HTML
59 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Live Streams</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
|
<style>
|
|
body {
|
|
background-color: black;
|
|
margin: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
}
|
|
.grid {
|
|
display: grid;
|
|
width: 100%;
|
|
height: 100%;
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: 1fr 1fr;
|
|
}
|
|
video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="grid">
|
|
<video id="stream1" autoplay muted playsinline></video>
|
|
<video id="stream2" autoplay muted playsinline></video>
|
|
<video id="stream3" autoplay muted playsinline></video>
|
|
<video id="stream4" autoplay muted playsinline></video>
|
|
</div>
|
|
|
|
<script>
|
|
function loadStream(videoElement, streamURL) {
|
|
if (videoElement.canPlayType('application/vnd.apple.mpegurl')) {
|
|
videoElement.src = streamURL; // Safari (native HLS support)
|
|
} else if (Hls.isSupported()) {
|
|
var hls = new Hls();
|
|
hls.loadSource(streamURL);
|
|
hls.attachMedia(videoElement);
|
|
}
|
|
}
|
|
|
|
loadStream(document.getElementById('stream1'), "https://ls.tkchopin.pl:9043/live/reda_jara_static.stream/playlist.m3u8");
|
|
loadStream(document.getElementById('stream2'), "https://ls.tkchopin.pl:9043/live/wejherowo_skrzyzowanie_rybacka_k6_static.stream/playlist.m3u8");
|
|
loadStream(document.getElementById('stream3'), "https://ls.tkchopin.pl:9043/live/bolszewo_skrzyzowanie_k6_zamostna_static.stream/playlist.m3u8");
|
|
loadStream(document.getElementById('stream4'), "https://hoktastream1.webcamera.pl/wejherowo_cam_e071d5/wejherowo_cam_e071d5.stream/chunks.m3u8");
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|