-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (51 loc) · 1.8 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
<!DOCTYPE html>
<html>
<head>
<title>Video Player</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<style>
body {
margin: 0;
background: #000;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#videoPlayer {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
#videoSelector {
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
color: #fff;
background: rgba(0,0,0,0.5);
border: none;
font-size: 20px;
padding: 10px;
}
</style>
</head>
<body>
<select id="videoSelector" onchange="changeVideo()">
<option value="https://www.youtube.com/embed/2zTXyXRcggc?loop=1&rel=0">Video 1</option>
<option value="https://www.youtube.com/embed/3tmd-ClpJxA?loop=1&rel=0">Video 2</option>
<option value="https://www.youtube.com/embed/ktvTqknDobU?loop=1&rel=0">Video 3</option>
<option value="https://www.youtube.com/embed/YQHsXMglC9A?loop=1&rel=0">Video 4</option>
</select>
<iframe id="videoPlayer" src="https://www.youtube.com/embed/2zTXyXRcggc?loop=1&rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<script>
function changeVideo() {
var videoPlayer = document.getElementById('videoPlayer');
var videoSelector = document.getElementById('videoSelector');
videoPlayer.setAttribute('src', videoSelector.value);
}
</script>
</body>
</html>