-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (35 loc) · 905 Bytes
/
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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Video Screensaver</title>
<style>
html,
body {
background-color: #000;
margin: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<video id="video" width="100%" height="100%" autoplay loop muted="">
<source src="videos/1.webm" type="video/webm">
</video>
<script>
var nums = [];
var num;
for (var i = 1; i <= 20; i++) {
nums.push(i.toString());
}
num = nums[Math.floor(Math.random() * nums.length)];
document.getElementById("video").src = "videos/" + num + ".webm"
setInterval(function() {
num = nums[Math.floor(Math.random() * nums.length)];
document.getElementById("video").src = "videos/" + num + ".webm"
}, 120000)
</script>
</body>
</html>