-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathintro.html
79 lines (68 loc) · 1.96 KB
/
intro.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
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
#centerDiv{
text-align: center;
width: 90%;
margin-left: auto;
margin-right: auto;
}
#introVideo{
width: 100%;
display: none;
}
#introVideo.visible{
display: block;
}
#hint{
display: none;
}
#hint.visible{
display: block;
}
#startButton{
display: none;
}
#startButton.visible{
display: block;
}
</style>
</head>
<body>
<div id="centerDiv">
<video controls id="introVideo">
<source src="./intro.mp4" type="video/mp4" autoplay>
Your browser does not support the video tag.
</video>
<div id="startButton" class="visible">
<p>Nechť hra započne! Pusťte si video!</p>
</div>
<div id="hint">
<p>V konzoli otevřete náš chat, kde naleznete jak pokračovat dále. Poradíme vám, hledejte na objektu $owidget</p>
</div>
</div>
<script type="text/javascript">
(function () {
var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true; scr.charset = 'UTF-8';
scr.src = '//app.mluvii.com/widget/OOWidget.js';
scr.$owidgetOnLoad = function (owidget) {
if (!owidget.isSupported) { return; }
owidget.init("295b1064-cf5b-4a5d-9e05-e7a74f86ae5e", "Nabor");
owidget.connectToServer();
};
var ffs = document.getElementsByTagName('script')[0]; ffs.parentNode.insertBefore(scr, ffs);
})();
document.getElementById('introVideo').addEventListener('ended',videoEndedHandler,false);
function videoEndedHandler(e) {
document.getElementById('introVideo').classList.remove("visible");
document.getElementById('hint').classList.add("visible");
}
document.getElementById('startButton').addEventListener('click',startClicked,false);
function startClicked(e) {
document.getElementById('introVideo').classList.add("visible");
document.getElementById('startButton').classList.remove("visible");
}
</script>
</body>
</html>