add get ready announcement
This commit is contained in:
@@ -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
BIN
get-ready.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user