-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
443 lines (394 loc) · 14.8 KB
/
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
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!--
Dual licensed under the MIT and GPL licenses.
- http://www.opensource.org/licenses/mit-license.php
- http://www.gnu.org/copyleft/gpl.html
Authors: Cole '@theCole' Gillespie and Mark '@maboa' Boas
-->
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Greencorps</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popcorn-ie8.min.js"></script>
<script type="text/javascript" src="js/popcorn.min.js"></script>
<script type="text/javascript" src="js/popcorn.code.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
//console.log('canPlay WebM = '+$('#park-video')[0].canPlayType('video/webm'));
var meridianHillData = [38.923127,-77.036394,38.919188,-77.036405,38.919238,-77.034817,38.920615,-77.034935,38.920882,-77.035225,38.923186,-77.035407];
var marvinGayeData = [38.902515,-76.950327,38.900316,-76.954444,38.903914,-76.960246,38.906223,-76.947725,38.901895,-76.942335,38.899013,-76.9392,38.898673,-76.930617,38.898589,-76.929275,38.898406,-76.925622,38.895787,-76.921875,38.898406,-76.925622,38.895787,-76.921875,38.894541,-76.917755,38.891936,-76.913614,38.891886,-76.910663,38.889806,-76.914762,38.892913,-76.917809,38.894641,-76.921918,38.895025,-76.924761,38.895334,-76.926778,38.89652,-76.926435,38.897004,-76.929889,38.896779,-76.937732,38.898407,-76.93917,38.899109,-76.942592,38.892971,-76.942624,38.895209,-76.94918,38.898357,-76.946551,38.898482,-76.94315,38.90052,-76.943075,38.902064,-76.945746,38.902515,-76.950327];
var oxonRunData = [38.813279,-77.019769,38.810135,-77.015027,38.814964,-77.010133,38.819137,-77.008815,38.820358,-77.005134,38.824412,-77.00552,38.825716,-77.005274,38.82921,-77.005692,38.829327,-77.005349,38.83389,-77.002677,38.837434,-76.995042,38.838659,-76.993119,38.839769,-76.988389,38.843649,-76.972749,38.844563,-76.970248,38.846854,-76.966078,38.850531,-76.96052,38.85079,-76.958439,38.849837,-76.95831,38.848876,-76.959705,38.845208,-76.964061,38.843328,-76.968159,38.842509,-76.969575,38.841197,-76.970369,38.840236,-76.973717,38.836204,-76.981855,38.837608,-76.983558,38.837608,-76.985361,38.83668,-76.986981,38.83795,-76.988225,38.836839,-76.993118,38.83592,-76.995832,38.833204,-77.000327,38.831081,-77.003535,38.825414,-77.003439,38.823976,-77.004361,38.820715,-77.00234,38.811375,-77.006817,38.805418,-77.000611,38.79693,-77.012649,38.805859,-77.022219,38.813499,-77.019704];
var meridianHill = [];
var marvinGaye = [];
var oxonRun = [];
for (i=0; i < meridianHillData.length; i += 2) {
meridianHill.push(new google.maps.LatLng(meridianHillData[i],meridianHillData[i+1]));
}
for (i=0; i < marvinGayeData.length; i += 2) {
marvinGaye.push(new google.maps.LatLng(marvinGayeData[i],marvinGayeData[i+1]));
}
for (i=0; i < oxonRunData.length; i += 2) {
oxonRun.push(new google.maps.LatLng(oxonRunData[i],oxonRunData[i+1]));
}
meridianHillPoly = new google.maps.Polygon({
paths: meridianHill,
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 3,
fillColor: "#FF0000",
fillOpacity: 0.35
});
marvinGayePoly = new google.maps.Polygon({
paths: marvinGaye,
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 3,
fillColor: "#FF0000",
fillOpacity: 0.35
});
oxonRunPoly = new google.maps.Polygon({
paths: oxonRun,
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 3,
fillColor: "#FF0000",
fillOpacity: 0.35
});
var globalVideoSource,
pinsAreDropped = false,
globalPov = 90;
var introVideo;
var parkAudio;
var parkVideo;
// popcorn init event
//console.log('init');
introVideo = Popcorn( "#intro-video" );
parkVideo = Popcorn( "#park-video" );
parkAudio = Popcorn( "#park-audio" )
.code({
start: 5,
enpanorama: 18,
onStart: function( options ) {
oxonRunPoly.setMap(map);
map.setZoom(13);
map.setCenter(new google.maps.LatLng(38.826057,-76.990325));
},
onEnd: function( options ) {
map.setZoom(12);
map.setCenter(new google.maps.LatLng(38.88059,-77.004034));
}
})
.code({
start: 21,
end: 40,
onStart: function( options ) {
meridianHillPoly.setMap(map);
setTimeout(function () {
map.setZoom(14);
map.setCenter(new google.maps.LatLng(38.92155,-77.035781));
}, 1500);
},
onEnd: function( options ) {
map.setZoom(12);
map.setCenter(new google.maps.LatLng(38.88059,-77.004034));
}
})
.code({
start: 60,
onStart: function( options ) {
var myLatlng = new google.maps.LatLng(38.897478,-76.925906);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Isaiah",
animation: google.maps.Animation.DROP
});
}
})
.code({
start: 46,
end: 62,
onStart: function( options ) {
marvinGayePoly.setMap(map);
setTimeout(function () {
map.setZoom(14);
map.setCenter(new google.maps.LatLng(38.899639,-76.936135));
}, 500);
},
onEnd: function(){
var isaiah = new google.maps.LatLng(38.897478,-76.925906);
var panoramaOptions = {
position: isaiah,
pov: {
heading: 90,
pitch: 5,
zoom: 1
}
};
$('#pano').fadeIn('slow', function() {
//console.log('pano opend')
var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
map.setStreetView(panorama);
});
}
});
introVideo.on('ended',function(){
$('.player-hldr').fadeOut('fast', function() {
//console.log('faded out player');
$('#map_canvas').fadeIn('fast', function() {
initializeGoogleMap();
parkAudio.play();
$('#temp-audio-controls').show();
});
});
});
parkAudio.on('ended',function(){
// start new piece of video 7 seconds after parkAudio has finished
setTimeout(function(){
$('#pano').fadeOut('fast');
$('#map_canvas').fadeOut('fast', function() {
//console.log('faded out player');
$('.player-hldr').fadeIn('fast', function() {
parkVideo.play();
$('#intro-video').hide();
$('#park-video').show();
$('#temp-audio-controls').hide();
});
});
},7000);
});
parkVideo.on('ended',function(){
//console.log('park ended');
var panoramaOptions = {
position: globalVideoSource,
pov: {
heading: globalPov,
pitch: 5,
zoom: 1
}
};
$('#pano').fadeIn('fast', function() {
$('#closeStreetView').show();
//console.log('pano opend');
var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
map.setStreetView(panorama);
$('#closeStreetView').click(function(){
$('#map_canvas').show();
$(this).hide();
panorama.setVisible(false);
$('#pano').hide();
setTimeout(function(){
if(!pinsAreDropped){
map.setZoom(12);
map.setCenter(new google.maps.LatLng(38.88059,-77.004034));
dropPins();
}
}, 1000);
});
});
});
var timeline = null;
function initializeGoogleMap() {
var myOptions = {
zoom: 12,
center: new google.maps.LatLng(38.88059,-77.004034),
mapTypeId: google.maps.MapTypeId.SATELLITE
};
map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);
}
function initNewVideo(o){
//console.log('initNewVideo(%o)', o);
globalPov = (o.pov) ? o.pov : 90;
globalVideoSource = new google.maps.LatLng(o.lat,o.lng);
var panoramaOptions = {
position: globalVideoSource,
pov: {
heading: (o.pov) ? o.pov : 90,
pitch: 5,
zoom: 1
}
};
$('#pano').fadeIn('slow', function() {
//console.log('pano opened');
var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
map.setStreetView(panorama);
// setTimeout
setTimeout(function(){
if ($('#park-video')[0].canPlayType('video/webm')) {
$('#park-video').attr('src',o.mp4.replace('.mp4','.webm'));
} else {
$('#park-video').attr('src',o.mp4);
}
$('#pano').fadeOut('slow');
$('#map_canvas').fadeOut('fast', function() {
$('.player-hldr').fadeIn('fast', function() {
parkVideo.play();
});
});
},4000);
});
}
function dropPin (o){
var pos = new google.maps.LatLng(o.lat,o.lng);
var marker = new google.maps.Marker({
position: pos,
map: map,
draggable: false,
animation: google.maps.Animation.DROP
});
google.maps.event.addListener(marker, 'click', function() {
initNewVideo(o);
});
}
function dropPins(){
pinsAreDropped = true;
var pins = [
{
lat:38.922432,
lng:-77.035269,
name: "Robin",
park: "Meridian Hill/Malcolm X Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Robin3-Vimeo%20HD.mp4",
pov:90
},
{
lat:38.922105,
lng:-77.0352,
name: "Buddy",
park: "Meridian Hill/Malcolm X Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Buddy1-Vimeo%20HD.mp4",
pov: 270
},
{
lat:38.897317,
lng:-76.926046,
name: "Philip",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Phillip-Vimeo%20HD.mp4",
pov: 150
},
{
lat:38.898413,
lng:-76.937594,
name: "Carlos",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Carlos_Creek-Vimeo%20HD.mp4",
pov: 280
},
{
lat:38.897102,
lng:-76.926015,
name: "James",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/James_Stabbing2-Vimeo%20HD.mp4",
pov: 80
},
{
lat:38.897478,
lng:-76.925906,
name: "Isaiah",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Isaiah%20-Vimeo%20HD.mp4",
pov:90
},
{
lat:38.896924,
lng:-76.92607,
name: "Charles",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Charles_Poem-Vimeo%20HD.mp4",
pov: 100
},
{
lat:38.895858,
lng:-76.92573,
name: "Brandon",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Brandon-Vimeo%20HD.mp4",
pov: 10
},
{
lat:38.897101,
lng:-76.926031,
name: "Kenny",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Kenny-Vimeo%20HD.mp4",
pov: 120
},
{
lat:38.837396,
lng:-76.99079,
name: "James",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/James_OxonRun2-Vimeo%20HD.mp4",
pov: 340
},
{
lat:38.83549,
lng:-76.996796,
name: "Michael",
park: "Marvin Gaye Park",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Michael_Tree2-Vimeo%20HD.mp4",
pov: 310
},
{
lat:38.835704,
lng:-76.99635,
name: "Henry",
mp4: "http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Charles_Tree-Vimeo%20HD.mp4",
pov: 330
}
];
//console.log('dropping pins')
$(pins).each(function(i,o) {
//console.log(o);
dropPin(o);
});
}
$('.go').click(function(){
$('.title').fadeOut('fast', function(){
$('.player-hldr').fadeIn('fast');
introVideo.play();
return false;
});
});
});
</script>
</head>
<body>
<div class="title">
<h1 class="title-header">Green Corps</h1>
<p>The feature-length documentary Green Corps (working title) explores how public relief programs have turned to the land to rebuild people's lives during times of economic decline in America.</p>
<p>The film follows the lives of people employed by the modern-day DC Green Corps, an urban forestry job training program inspired by the New Deal-era Civilian Conservation Corps.</p>
<p>This 'walking tour' prototype, developed during a Mozilla Livingdocs 'Hackathon' at Silverdocs 2012, provides a framework for the Green Corps trainees to guide audiences on a tour of their neighborhoods and the green spaces where they live.</p>
<p class="action-btn"><a class="go" href="#">GO ON THE TOUR</a></p>
<p class="action">For more information on the film, visit <a href="http://meridianhillpictures.com">meridianhillpictures.com</a></p>
</div>
<div id="closeStreetView" style="display:none;">Watch other trainees</div>
<div id="temp-audio-controls" style="display:none">
<audio id="park-audio" preload="auto">
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/hackathonaudio.mp3" >
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/hackathonaudio.ogg" >
</audio>
</div>
<div id="pano"></div>
<div id="map_canvas"></div>
<div class="app-hldr">
<div class="player-hldr" style="display:none">
<video id="intro-video" preload="auto" controls style="width:100%;">
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/HackathonIntro4.mp4" >
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/HackathonIntro4.webm" >
</video>
<video id="park-video" preload="auto" controls style="width:100%;display:none">
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Isaiah%20-Vimeo%20HD.mp4" >
<source src="http://videos-origin.mozilla.org/serv/webmademovies/silverhacks/Isaiah%20-Vimeo%20HD.webm" >
</video>
</div> <!-- end .player-hldr -->
</div> <!-- end .app-hldr -->
</body>
</html>