Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 131 lines (107 sloc) 4.149 kb
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/player_style.css">
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<script src="js/libs/modernizr-2.5.3.min.js"></script>
<script type="text/javascript" src="js/d3.v2.js?2.8.1"></script>
<script type="text/javascript" src="js/underscore-min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="js/jquery.ui.min.js"></script>
<script src="http://vjs.zencdn.net/c/video.js"></script>
<script src="js/videoplayer.js"></script>
<script src="js/node-data.js"></script>
<script src="js/widget.js"></script>
<script src="http://cdn.popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script type="text/javascript" src="js/popcorn-images.js"></script>
</head>
<body onload="setup_timeline()">
<input type="range" min="0" max="168" value="0" style="width:900px" onchange="update(this.value)"></input>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<header id="header">
<h1>A Perfect Terrorist</h1>
<h2>The Web of David Coleman Headley</h2>
</header>
<div id="content" role="main">
<div id="background"></div>
<div id="chart"></div>
<div id="foreground"></div>
</div>
<footer>
</footer>
<script type="text/javascript" src="js/timeline-graph.js"></script>
<script>
$(function() {
initAudio();
});
function initAudio() {
var supportsAudio = !!document.createElement('audio').canPlayType,
audio,
loadingIndicator,
positionIndicator,
timeleft,
loaded = false,
manualSeek = false;
if (supportsAudio) {
var player_code = '<p class="player">\
<span id="playhead" />\
<audio id="popcorn" preload="metadata">\
<source src="media/narration.mp3" type="audio/mpeg"></source>\
<source src="media/narration.ogg" type="audio/vorbis"></source>\
</audio>\
</p>';
$(player_code).appendTo("#foreground");
audio = $('.player audio').get(0);
loadingIndicator = $('.player #loading');
positionIndicator = $('.player #playhead');
timeleft = $('.player #timeleft');
$(audio).bind('timeupdate', function() {
update(audio.currentTime);
var rem = parseInt(audio.duration - audio.currentTime, 10),
pos = (audio.currentTime / audio.duration) * 100,
mins = Math.floor(rem/60,10),
secs = rem - mins*60;
timeleft.text('-' + mins + ':' + (secs < 10 ? '0' + secs : secs));
if (!manualSeek) { positionIndicator.css({top: pos + '%'}); }
if (!loaded) {
loaded = true;
$('.player #gutter').slider({
value: 0,
step: 0.01,
orientation: "vertical",
range: "min",
max: audio.duration,
animate: true,
slide: function(){
manualSeek = true;
},
stop:function(e,ui){
manualSeek = false;
audio.currentTime = ui.value;
}
});
}
}).bind('play',function(){
$("#playtoggle").addClass('playing');
}).bind('pause ended', function() {
$("#playtoggle").removeClass('playing');
});
$("#playtoggle").click(function() {
if (audio.paused) { audio.play(); }
else { audio.pause(); }
});
}
}
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.