-
Notifications
You must be signed in to change notification settings - Fork 0
/
video-area.html
60 lines (56 loc) · 1.59 KB
/
video-area.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Area</title>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
#videoContainer {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
z-index: 9999;
}
video {
width: 100%;
height: 100%;
object-fit: contain;
}
</style>
</head>
<body>
<div id="videoContainer">
<video id="fullScreenVideo" autoplay controls>
Your browser does not support the video tag.
</video>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const auth = sessionStorage.getItem('auth');
const fullScreenVideo = document.getElementById('fullScreenVideo');
if (auth === '1') {
fullScreenVideo.src = '2.mp4';
} else {
fullScreenVideo.src = '1.mp4';
}
// Play video
fullScreenVideo.play();
fullScreenVideo.addEventListener('ended', function() {
window.location.href = 'main.html';
});
});
</script>
</body>
</html>