Skip to content

Commit

Permalink
force audio to play even lagged for firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
kidwm committed Sep 18, 2012
1 parent 0ad7f79 commit fe7ae3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ function reStartGame(){

function playSound(filename) {
var index = ['intro','select','match','applause'].indexOf(filename);
$('audio.sound').get(index).play();
var sound = document.querySelectorAll('audio.sound')[index];
sound.currentTime = 0;
sound.play();
}

function toggleFullscreen() {
Expand Down
Binary file modified sound/match.mp3
Binary file not shown.
Binary file modified sound/match.ogg
Binary file not shown.

0 comments on commit fe7ae3e

Please sign in to comment.