-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinteraction.js
98 lines (70 loc) · 2.55 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//you initial location or time
//var Story = ["This is a walking story", "It takes 10 minutes",
//"You can start walking anywhere in the world", "but you will end up in the same place", "You are", "neither here", "nor there.", "Me too."]
//var video = document.getElementById("video1");
//var shownStory = new Array();
$(document).ready(function () {
console.log('jquery');
setInterval(intID, 3000);
//setInterval(showStory(), 3000);
});
var intID= function() {
console.log("just called the interval");
if (varCounter <= 5){
varCounter++;
//playVideo();
//changeStory(0);
//increase that as the video is playing
} else {
clearInterval(intID);
//stopVideo();
//changeStory();
}
};
function playVideo() {
var video = document.getElementById("Video1");
video.play();
}
// function stopVideo() {
// var video = document.getElementById("Video1");
// video.pause();
// }
// function changeStory(previousStory) {
// console.log("the story should change");
// //var currStory = previousStory;
// // var i=0;
// //previousStory++;
// var currStory = previousStory;
// //it is giving me an undefined.
// console.log("this is the currStory"+ currStory);
// console.log("this is the story length"+ Story.length);
// if (currStory<Story.length) {
// console.log("im in the while loop");
// // showStory(currStory);
// console.log("this is the currentStory" + currStory);
// showStory(currStory);
// //I have to check that current story is not the same as previous story before i upload
// //them into the array
// //shownStory.push(currStory);
// // console.log("this is the length of the shownStory"+ shownStory.length)
// }
// }
// function showStory(currStory) {
// $('#text').html('<span>' + Story[currStory] +'<span><br>');
// //console.log("this is the currentStory" + Story[currStory]);
// //changeStory(currStory);
// }
// function changeStory() {
// var currentStory;
// for (var i=0; i<Story.length; i++) {
// console.log("this is i"+ i);
// var currStory = i;
// showStory(currStory);
// }
// // showStory(currStory);
// console.log("this is i"+i);
// }
// function showStory(currStory) {
// $('#text').html('<span>' + Story[currStory] +'<span><br>');
// console.log("this is the currentStory" + Story[currStory]);
// }