Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (60 sloc) 3.02 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuery HTML 5 Audio Controller</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Jaime Bueza">
<!-- Date: 2010-06-13 -->
</head>
<body>
<h1>jQuery HTML 5 Audio Controller</h1>
<p>Command &amp; Conquer and Red Alert sounds/songs utilizing HTML5's &lt;audio&gt; element.</p>
<p>Notice how you can spam click the unit sounds without any queueing.</p>
<ul id="sound-list">
<li><a href="#" id="trigger-1" class="play">Affirmative</a> (<a href="#" id="stop-1" class="stop">Stop</a>)</li>
<li><a href="#" id="trigger-2" class="play">Negative</a> (<a href="#" id="stop-2" class="stop">Stop</a>) </li>
<li><a href="#" id="trigger-3" class="play">Not A Problem</a> (<a href="#" id="stop-3" class="stop">Stop</a>)</li>
<li><a href="#" id="trigger-4" class="play">Reinforcements Have Arrived</a>(<a href="#" id="stop-4" class="stop">Stop</a>) </li>
<li><a href="#" id="trigger-5" class="play">Select Target</a> (<a href="#" id="stop-5" class="stop">Stop</a>) </li>
<li><a href="#" id="trigger-6" class="play">(Song) Act On Instinct</a> (<a href="#" id="stop-6" class="stop">Stop</a>)</li>
<li><a href="#" id="trigger-7" class="play">(Song) Big Foot</a> (<a href="#" id="stop-7" class="stop">Stop</a>)</li>
<li><a href="#" id="trigger-8" class="play">(Song) Hell March</a> (<a href="#" id="stop-8" class="stop">Stop</a>)</li>
</ul>
<audio id="sound-1" title="affirmative" autobuffer>
<source src="files/ogg/affirmative.ogg">
<source src="files/mp3/affirmative.mp3">
</audio>
<audio id="sound-2" title="negative" autobuffer>
<source src="files/ogg/negative.ogg">
<source src="files/mp3/negative.mp3">
</audio>
<audio id="sound-3" title="not a problem" autobuffer>
<source src="files/ogg/not_a_problem.ogg">
<source src="files/mp3/not_a_problem.mp3">
</audio>
<audio id="sound-4" title="reinforcements have arrived" autobuffer>
<source src="files/ogg/reinforcements.ogg">
<source src="files/mp3/reinforcements.mp3">
</audio>
<audio id="sound-5" title="select target" autobuffer>
<source src="files/ogg/select_target.ogg">
<source src="files/mp3/select_target.mp3">
</audio>
<audio id="sound-6" title="act on instinct" autobuffer>
<source src="files/ogg/songs/instinct.ogg">
<source src="files/mp3/songs/instinct.mp3">
</audio>
<audio id="sound-7" title="big foot" autobuffer>
<source src="files/ogg/songs/bigfoot.ogg">
<source src="files/mp3/songs/bigfoot.mp3">
</audio>
<audio id="sound-8" title="hell march" autobuffer>
<source src="files/ogg/songs/hell_march.ogg">
<source src="files/mp3/songs/hell_march.mp3">
</audio>
</body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="bootstrap.js"></script>
</html>