-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (41 loc) · 938 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<title>Video Player</title>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
#video-container {
width: 100%;
height: 100%;
}
video {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="video-container">
<video id="video" controls></video>
</div>
<script>
window.addEventListener('DOMContentLoaded', function() {
// Get the m3u8 link from the URL
const urlParams = new URLSearchParams(window.location.search);
const m3u8Link = urlParams.get('m3u8');
// Set the m3u8 link as the source of the video element
const video = document.getElementById('video');
const source = document.createElement('source');
source.setAttribute('src', m3u8Link);
video.appendChild(source);
video.load();
});
</script>
</body>
</html>