-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatch.html
More file actions
128 lines (110 loc) · 2.82 KB
/
Copy pathwatch.html
File metadata and controls
128 lines (110 loc) · 2.82 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Lecture - SOCO TV</title>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
body {
background: linear-gradient(135deg, #0d0d0d, #1a1a1a);
color: #fff;
font-family: "Segoe UI", Arial, sans-serif;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.header {
width: 100%;
background: rgba(255,255,255,0.05);
backdrop-filter: blur(8px);
padding: 15px 20px;
display: flex;
align-items: center;
gap: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
position: relative;
top: 0;
justify-content: center;
}
.header h1 {
font-size: 22px;
margin: 0;
text-align: center;
}
.video-container {
width: 90%;
max-width: 900px;
margin-top: 30px;
border-radius: 14px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
background: rgba(255,255,255,0.05);
backdrop-filter: blur(6px);
padding: 15px;
animation: appear 0.6s ease-out;
}
video {
width: 100%;
border-radius: 10px;
background: black;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
@keyframes appear {
from { opacity: 0; transform: translateY(15px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body>
<div class="header">
<h1 id="channelName">Chargement…</h1>
</div>
<div class="video-container">
<video id="player" controls autoplay></video>
</div>
<script>
const channels = {
"echo": {
name: "echo",
url: "https://live20.bozztv.com/giatv/giatv-echo/echo/playlist.m3u8"
},
"AIRBENZTV": {
name: "AIRBENZTV",
url: "https://live20.bozztv.com/giatv/giatv-AIRBENZTV/AIRBENZTV/playlist.m3u8"
},
"nexttv": {
name: "nexttv",
url: "https://live20.bozztv.com/giatv/giatv-4/4/playlist.m3u8"
},
"SOCO23": {
name: "SOCO 23",
url: "https://live20.bozztv.com/giatv/giatv-soco23/soco23/playlist.m3u8"
}
};
const urlParams = new URLSearchParams(window.location.search);
const id = urlParams.get("id");
if (!channels[id]) {
document.querySelector(".header h1").innerText = "Chaîne inconnue";
document.getElementById("loading").style.display = "none";
} else {
document.getElementById("channelName").innerText = channels[id].name;
const streamUrl = channels[id].url;
const video = document.getElementById("player");
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(streamUrl);
hls.attachMedia(video);
} else {
video.src = streamUrl;
}
video.addEventListener("loadeddata", () => {
document.getElementById("loading").style.display = "none";
document.querySelector(".video-container").style.display = "block";
});
}
</script>
</body>
</html>