-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
161 lines (143 loc) · 4.37 KB
/
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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BOX-STREAM</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #121212;
color: #ffffff;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
min-height: 100vh;
padding-top: 40px;
}
.header {
text-align: center;
margin-bottom: 20px;
padding: 0 20px;
}
.header h1 {
margin: 0;
font-size: 2em;
color: #1DB954;
text-transform: uppercase;
letter-spacing: 0.1em;
}
.input-group {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px;
width: 100%;
max-width: 400px;
padding: 0 20px;
}
.input-group input[type="text"] {
padding: 10px;
border-radius: 20px;
border: 2px solid #1DB954;
background-color: #1c1c1c;
color: #fff;
width: 100%;
font-size: 1em;
margin-bottom: 15px;
text-align: center;
transition: border 0.3s ease;
}
.input-group input[type="text"]:focus {
border-color: #3cba63;
outline: none;
}
.buttons {
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
}
.buttons button {
flex: 1;
padding: 10px;
border: none;
border-radius: 20px;
background-color: #1DB954;
color: white;
font-size: 1em;
cursor: pointer;
box-shadow: 0 4px #15883e;
transition: all 0.3s ease;
}
.buttons button:hover {
background-color: #1ed760;
}
.buttons button:active {
box-shadow: 0 2px #15883e;
transform: translateY(2px);
}
.video-container {
position: relative;
width: 100%;
max-width: 800px;
margin: 20px auto;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
background-color: #1c1c1c;
padding: 0;
border-radius: 12px;
overflow: hidden;
display: none;
}
iframe {
width: 100%;
height: 450px;
border: none;
}
@media (max-width: 768px) {
iframe {
height: 300px;
}
}
</style>
</head>
<body>
<div class="header">
<h1>BOX-STREAM</h1>
</div>
<div class="input-group">
<input type="text" id="urlInput" placeholder="Enter Video URL Here">
<div class="buttons">
<button id="embedButton">Embed Video</button>
</div>
</div>
<div class="video-container" id="videoContainer">
<iframe id="videoFrame" src="" allowfullscreen></iframe>
</div>
<script>
document.getElementById('embedButton').addEventListener('click', () => {
const urlInput = document.getElementById('urlInput').value;
const videoContainer = document.getElementById('videoContainer');
const videoFrame = document.getElementById('videoFrame');
if (!urlInput) {
alert('Please enter a URL.');
return;
}
// Extract the video ID from the input URL and remove the first character
const match = urlInput.match(/s\/(\w+)/);
if (match && match[1]) {
const videoId = match[1].substring(1); // Remove the first character
const embedUrl = `https://www.1024terabox.com/sharing/embed?surl=${videoId}`;
// Set the iframe source and display the video container
videoFrame.src = embedUrl;
videoContainer.style.display = 'block';
} else {
alert('Invalid Terabox URL. Please enter a valid URL.');
}
});
</script>
</body>
</html>