diff --git a/web/js/main.js b/web/js/main.js index d3b5c6e..4372abd 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -1,5 +1,6 @@ var fragen = null; var intro = null; +var introVolume = 1; var jeopardy = null; var schweinchenVolume = 1; var jeopardyVolume = 1; @@ -179,7 +180,7 @@ function stopSchweinchen() { var index = $("#questionsSelcet>option:selected").index(); $("#questionsSelcet").val(index+1); changeFrage(); - + $("#schweinchenImg").hide(); $("#answers").show(); if(schweinchen) { @@ -200,6 +201,7 @@ function showIntro() { $(".intro").show(); if(sounds && (display || serverSound)) { intro = new Audio('./sounds/intro.mp3'); + intro.volume = introVolume; intro.play(); } } diff --git a/web/js/websocket.js b/web/js/websocket.js index 082923c..f5ee06b 100644 --- a/web/js/websocket.js +++ b/web/js/websocket.js @@ -122,8 +122,9 @@ var connectWs = function() { } else if(key == "hideIntro") { hideIntro(); } else if(key == "setIntroVolume") { + introVolume = value; if(intro != null) - intro.volume = value; + intro.volume = introVolume; } else if(key == "setLeftPoints") { setLeftPoints(value); } else if(key == "setRightPoints") {