-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (59 loc) · 2.06 KB
/
Copy pathindex.html
File metadata and controls
61 lines (59 loc) · 2.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Streaming Proxy</title>
<style>
body { font-family: Arial, sans-serif; margin: 2rem; }
label { display: block; margin-top: 1rem; }
input[type=text] { width: 80%; padding: 0.5rem; }
button { margin: 1rem 0; padding: 0.5rem 1rem; }
.player { margin-top: 2rem; }
</style>
</head>
<body>
<h1>Video Streaming Proxy</h1>
<label>
Source URL (required):<br>
<input type="text" id="url" placeholder="https://remote/video.mp4">
</label>
<label>
Cookie:<br>
<input type="text" id="cookie" placeholder="Optional cookies string">
</label>
<label>
Referer:<br>
<input type="text" id="referer" placeholder="Optional referer URL">
</label>
<label>
User-Agent:<br>
<input type="text" id="ua" placeholder="Optional user-agent">
</label>
<button onclick="play()">Play</button>
<div class="player">
<video id="video" width="800" height="450" controls preload="none" style="background:#000"></video>
</div>
<script>
function play() {
const url = document.getElementById('url').value.trim();
if (!url) {
alert('Source URL is required.');
return;
}
const cookie = encodeURIComponent(document.getElementById('cookie').value.trim());
const referer = encodeURIComponent(document.getElementById('referer').value.trim());
const ua = encodeURIComponent(document.getElementById('ua').value.trim());
let params = `url=${encodeURIComponent(url)}`;
if (cookie) params += `&cookie=${cookie}`;
if (referer) params += `&referer=${referer}`;
if (ua) params += `&ua=${ua}`;
const video = document.getElementById('video');
video.src = `/stream?${params}`;
video.load();
video.play();
}
</script>
</body>
</html>