Skip to content
Browse files

updated sources

  • Loading branch information...
1 parent 9abd843 commit 4b392b254d2ab9b6d5ca1fe2463b4f3a3fc0801b Per-Olov Jernberg committed Sep 6, 2012
Showing with 28 additions and 9 deletions.
  1. +5 −1 frontend/code.js
  2. +20 −5 frontend/index.html
  3. +3 −3 frontend/style.css
View
6 frontend/code.js
@@ -1,6 +1,10 @@
var Mixer = function(elementid) {
this.element = document.getElementById(elementid);
+ this.element.addEventListener('ended', function() {
+ this.currentTime = 0;
+ this.play();
+ }, false);
this.targetvalue = 0;
this.currentvalue = 0;
};
@@ -33,7 +37,7 @@ Mixer.prototype.play = function() {
Mixer.prototype.stop = function() {
this.element.pause();
-}
+};
var m1, m2, m3, m4, m5;
var lat=58, lon=18;
View
25 frontend/index.html
@@ -37,11 +37,26 @@
</div>
<div id="audios">
- <audio id="a1" src="a1-faded.ogg" loop controls preload></audio><br/>
- <audio id="a2" src="a2-faded.ogg" loop controls preload></audio><br/>
- <audio id="a3" src="a3-faded.ogg" loop controls preload></audio><br/>
- <audio id="a4" src="a4-faded.ogg" loop controls preload></audio><br/>
- <audio id="a5" src="a5-faded.ogg" loop controls preload></audio><br/>
+ <audio id="a1" controls preload>
+ <source src="a1-faded.mp3" type="audio/mpeg" />
+ <source src="a1-faded.ogg" type="audio/ogg" />
+ </audio><br/>
+ <audio id="a2" controls preload>
+ <source src="a2-faded.mp3" type="audio/mpeg" />
+ <source src="a2-faded.ogg" type="audio/ogg" />
+ </audio><br/>
+ <audio id="a3" controls preload>
+ <source src="a3-faded.mp3" type="audio/mpeg" />
+ <source src="a3-faded.ogg" type="audio/ogg" />
+ </audio><br/>
+ <audio id="a4" controls preload>
+ <source src="a4-faded.mp3" type="audio/mpeg" />
+ <source src="a4-faded.ogg" type="audio/ogg" />
+ </audio><br/>
+ <audio id="a5" controls preload>
+ <source src="a5-faded.mp3" type="audio/mpeg" />
+ <source src="a5-faded.ogg" type="audio/ogg" />
+ </audio><br/>
</div>
<script type="text/javascript">
View
6 frontend/style.css
@@ -1,7 +1,7 @@
body {
background-color: #222;
background-image: url(asfalt.png);
- overflow: none;
+ overflow: hidden;
font-family: Trebuchet MS, Helvetica, Arial;
color: #aaa;
text-shadow: 0 2px 3px #000;
@@ -32,8 +32,8 @@ a {
#audios {
position: absolute;
- left: -1000px;
- top: -1000px;
+ right: -500px;
+ top: 0px;
}
h1 {

0 comments on commit 4b392b2

Please sign in to comment.
Something went wrong with that request. Please try again.