-
Notifications
You must be signed in to change notification settings - Fork 1
/
InteractiveVideo-Interaction.js
59 lines (53 loc) · 1.18 KB
/
InteractiveVideo-Interaction.js
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
function DaggerAttack(){
lastTime = videoElement.currentTime;
index = Math.round(52/10);
chosen = true;
videoElement.currentTime = 52;
}
function FreezeTimer(){
lastTime = videoElement.currentTime;
index = Math.round(88/10);
chosen = true;
videoElement.currentTime = 88;
}
function RatBomb(){
lastTime = videoElement.currentTime;
index = Math.round(139/10);
chosen = true;
videoElement.currentTime = 139;
}
function showMenu2(active) {
if(active){
}
else{
}
}
function showMenu0(active) {
if(active){
}
else{
}
}
videoElement.addEventListener("timeupdate",
function(event){
var curTime = videoElement.currentTime;
document.getElementById("time").innerHTML = "time : " + curTime;
if((curTime >= 75 ) && (curTime < 88)){
chosen = false;
document.getElementById("demo").innerHTML = "menu activer" + curTime;
showMenu0(false);
showMenu1(true);
if((curTime >= 87) && (!chosen)){
videoElement.currentTime = 75;
}
}
if((curTime >= 44 ) && (curTime < 2)){
chosen = false;
document.getElementById("demo").innerHTML = "menu activer" + curTime;
showMenu1(false);
showMenu0(true);
if((curTime >= 1) && (!chosen)){
videoElement.currentTime = 44;
}
}
});