add get ready announcement

This commit is contained in:
Nick Stokoe
2013-12-31 16:05:09 +00:00
parent e300cef51c
commit 1dc5b59414
2 changed files with 3 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ var counter = document.getElementById("counter");
var loc = document.getElementById("location"); var loc = document.getElementById("location");
var time = document.getElementById("localtime"); var time = document.getElementById("localtime");
var countDownSound = new Audio('countdown-nick.ogg'); var countDownSound = new Audio('get-ready.ogg');
@@ -100,13 +100,14 @@ function handleTick(now) {
var excl = millisecsRemaining < 1000*5? "!" : ""; var excl = millisecsRemaining < 1000*5? "!" : "";
console.log("seconds",now.getSeconds()); console.log("seconds",now.getSeconds());
if (millisecsRemaining < 10000) { if (millisecsRemaining < 2*60*1000) {
if (!playing) { if (!playing) {
countDownSound.play(); countDownSound.play();
playing = true; playing = true;
} }
} }
else else
// resets the announcement
playing = false; playing = false;
counter.innerHTML = timeRemaining(millisecsRemaining); counter.innerHTML = timeRemaining(millisecsRemaining);

BIN
get-ready.ogg Normal file

Binary file not shown.