-
Notifications
You must be signed in to change notification settings - Fork 0
/
ishtar.html
209 lines (168 loc) · 8.94 KB
/
ishtar.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
<!-- Shaka Player compiled library:
<script src="node_modules/shaka-player/dist/shaka-player.compiled.js"></script>-->
<!-- Your application source:
<script src="myapp.js"></script>-->
<link href="node_modules/cloudinary-video-player/dist/cld-video-player.min.css" rel="stylesheet">
<script src="node_modules/lodash/lodash.js" type="text/javascript"></script>
<script src="node_modules/cloudinary-core/cloudinary-core.js" type="text/javascript"></script>
<script src="node_modules/cloudinary-video-player/dist/cld-video-player.min.js" type="text/javascript"></script>
<script src="js/calibration.js"></script>
<script src="js/precision_calculation.js"></script>
<script src="js/webgazer.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="scss/home.scss">
<link rel="stylesheet" href="scss/home.css">
<link rel="stylesheet" href="scss/home.css.map">
<link rel="stylesheet" href="scss/experiment.scss">
<link rel="stylesheet" href="css/experiment.css.map">
<link rel="stylesheet" href="css/experiment.css">
<title>Ishtar</title>
</head>
<body>
<div class="wrapper" id="wrapper">
<div class="top-bar">
<button class="top-bar__nav-toggle hamburger" id="top-nav-toggle">
<span></span>
<span></span>
<span></span>
</button>
<span> <a href="index.html" class="top-bar__brand">Ishtar</a></span>
<span><a href="learn-more.html" class="top-bar__contact">
learn more</a></span>
<nav class="top-bar__nav collapsed" id="top-bar__nav">
<ul class="top-bar__nav-list ">
<li><a href="learn-more.html">Learn More</a></li>
<li><a href="the-experiment.html">The Experiment</a></li>
<li><a href="how-it-works.html">How It Works</a></li>
</ul>
</nav>
</div>
</div>
<div id="webgazerVideoContainer" style="display: block; position: fixed; top: 0px; left: 0px; width: 220px; height: 140px;">
<video playsinline="" id="webgazerVideoFeed" autoplay="" style="display: block; position: absolute; width: 220px; height: 140px; transform: scale(-1, 1);"></video>
<canvas id="webgazerVideoCanvas" width="640" height="480" style="display: none;"></canvas>
<canvas id="webgazerFaceOverlay" width="640" height="480" style="display: block; position: absolute; transform: scale(-1, 1); width: 220px; height: 140px;"></canvas>
<canvas id="webgazerFaceFeedbackBox" style="display: block; border: solid white; position: absolute; top: 40.8px; left: 80.8px; width: 158.4px; height: 158.4px;"></canvas>
</div>
<!--<section class="vidbox">
<video muted autoplay id="vid1" controls width="768">
<source src="vid/violence_4.mp4" type="video/mp4">
</video>
<video muted autoplay sound:d id="vid2" controls width="768">
<source src="vid/sex_2.mp4" type="video/mp4">
</video>
</section>
</div>-->
<div class="wrapper" id="wrapper" style="display:flex; flex-direction:column; max-width:1440px; position:relative;margin:0 auto;">
<div class='vidSection' style='display: flex;flex-direction: row; align-items: center; justify-content: space-around;'>
<video id="example-player" style="display: flex;flex-direction:column; align-items: center;" width="500" height="380" controls muted autoplay class="cld-video-player" data-cld-colors='{ "base": "#810303bb", "accent": "#E90003", "text": "#FCFAFC" }' data-cld-transformation='{ "width": 500, "height": 380 }'></video>
<video id="example-player-2" style="display: flex;flex-direction:column;align-items: center;" width="500" height="380" controls muted autoplay class="cld-video-player" data-cld-colors='{ "base": "#810303bb", "accent": "#E90003", "text": "#FCFAFC" }' data-cld-transformation='{ "width": 500, "height": 380 }'></video>
</div>
<button id="play-prev" class="btn btn-default btn-ish">Prev</button>
<button id="play-next" class="btn btn-default btn-ish">Next</button> >
<a href="the-report.html" class="top-bar__contact" style="padding:10px;position:relative;margin:0 auto; text-align:center;">
stop and go to report</a>
</div>
<script src="js/resize_canvas.js"></script>
<div id="webgazerGazeDot" style="display: none; position: fixed; z-index: 99999; left: -5px; top: -5px; background: red; border-radius: 100%; opacity: 0.7; width: 10px; height: 10px;"></div>
</div>
<script>
var cld = cloudinary.Cloudinary.new({
cloud_name: 'ishdb'
});
// Initialize player
var player = cld.videoPlayer('example-player');
// Pass a sorter to sort list in alphabetical order by publicId
var sorter = function(a, b) {
if (a.publicId < b.publicId) return Math.random(b) * (1);
if (a.publicId > b.publicId) return Math.random(a) * (-1);
return 0;
};
// Fetch playlist by tag. Since this operation involves an API call
// the function returns a Promise when the operation completes.
// The return value is 'player '.
player.playlistByTag('violence', {
sorter: sorter,
sourceParams: {
angle: 0
},
autoAdvance: 1,
repeat: true
}).then(function(player) {
var divElem = document.querySelector("div#playlist-data");
var list = player.playlist().list().map(function(source) {
return source.publicId()
}).join(', ');
divElem.innerText = "Playlist: " + list
});
function updateSource() {
var divElem = document.querySelector("div#source-data");
publicIdElem = divElem.querySelector("#public-id-placeholder");
sourceUrlElem = divElem.querySelector("#source-url-placeholder ");
publicIdElem.innerText = "Public Id: " + player.currentPublicId();
sourceUrlElem.innerText = "Source URL: " + player.currentSourceUrl();
divElem.style.display = 'block ';
}
player.on('sourcechanged', updateSource);
document.querySelector("button#play-prev").addEventListener("click", function() {
player.playPrevious();
playerTwo.playPrevious();
});
document.querySelector("button#play-next").addEventListener("click", function() {
player.playNext();
playerTwo.playNext();
});
</script>
<script>
var cld = cloudinary.Cloudinary.new({
cloud_name: 'ishdb'
});
// Initialize player
var playerTwo = cld.videoPlayer('example-player-2');
// Pass a sorter to sort list in alphabetical order by publicId
var sorter = function(a, b) {
if (a.publicId < b.publicId) return 1;
if (a.publicId > b.publicId) return -1;
return 0;
};
// Fetch playlist by tag. Since this operation involves an API call
// the function returns a Promise when the operation completes.
// The return value is 'player '.
playerTwo.playlistByTag('sex', {
sorter: sorter,
sourceParams: {
angle: 0
},
autoAdvance: 0,
repeat: true
}).then(function(playerTwo) {
var divElem = document.querySelector("div#playlist-data ");
var list = playerTwo.playlist().list().map(function(source) {
return source.publicId()
}).join(', ');
divElem.innerText = "Playlist: " + list
});
function updateSource() {
var divElem = document.querySelector("div#source-data ");
publicIdElem = divElem.querySelector("#public-id-placeholder ");
sourceUrlElem = divElem.querySelector("#source-url-placeholder ");
publicIdElem.innerText = "Public Id: " + playerTwo.currentPublicId();
sourceUrlElem.innerText = "Source URL: " + playerTwo.currentSourceUrl();
divElem.style.display = 'block ';
}
player.on('sourcechanged ', updateSource);
</script>
</body>
</html>