-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
138 lines (119 loc) · 3.18 KB
/
index.html
File metadata and controls
138 lines (119 loc) · 3.18 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
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>篁竹委透明公益庭审直播平台</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- HLS / FLV -->
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/flv.js@latest"></script>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #0f0f0f;
color: #eee;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px;
background: #1a1a1a;
border-bottom: 1px solid #333;
}
header h1 {
margin: 0;
font-size: 18px;
}
#time {
font-size: 14px;
opacity: 0.9;
}
main {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
gap: 16px;
}
video {
width: 100%;
max-width: 960px;
background: #000;
}
#quote {
max-width: 960px;
font-size: 15px;
opacity: 0.85;
text-align: left;
min-height: 1.5em;
}
footer {
position: fixed;
left: 10px;
bottom: 8px;
font-size: 12px;
opacity: 0.6;
}
</style>
</head>
<body>
<header>
<h1>篁竹委透明公益庭审直播平台</h1>
<div id="time"></div>
</header>
<main>
<p>当前没有庭审,正在转播北京移动IPTV-北京卫视频道。</p>
<video id="player" controls autoplay muted></video>
<div id="quote"></div>
</main>
<footer>
© 2026 YashimaDev All rights reserved.\n
Powered by Github Pages | OpenAI GPT-4 | Yashima Sou
</footer>
<script>
/* ===== 实时时间 ===== */
function updateTime() {
const now = new Date();
document.getElementById("time").textContent =
now.toLocaleString("zh-CN", { hour12: false });
}
updateTime();
setInterval(updateTime, 1000);
/* ===== 播放器 ===== */
const video = document.getElementById("player");
// 在这里填直播流地址
const streamUrl = "http://120.211.62.180:8000/hls/35/index.m3u8"; // 例如:https://example.com/live.m3u8
if (streamUrl.endsWith(".m3u8")) {
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(streamUrl);
hls.attachMedia(video);
} else {
video.src = streamUrl;
}
} else if (streamUrl.endsWith(".flv")) {
if (flvjs.isSupported()) {
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: streamUrl
});
flvPlayer.attachMediaElement(video);
flvPlayer.load();
}
} else if (streamUrl) {
video.src = streamUrl;
}
/* ===== 一言(写死在 HTML) ===== */
const quotes = [
"Hello, World!",
"In solitude, Where we are least alone.\n——『ヨスガノソラ』",
"下次一定",
"wonderhoi!已出现人传人现象"
];
const q = quotes[Math.floor(Math.random() * quotes.length)];
document.getElementById("quote").textContent = q;
</script>
</body>
</html>