fix volume bug
This commit is contained in:
parent
d2df9db668
commit
ea3220f909
@ -1,5 +1,6 @@
|
|||||||
var fragen = null;
|
var fragen = null;
|
||||||
var intro = null;
|
var intro = null;
|
||||||
|
var introVolume = 1;
|
||||||
var jeopardy = null;
|
var jeopardy = null;
|
||||||
var schweinchenVolume = 1;
|
var schweinchenVolume = 1;
|
||||||
var jeopardyVolume = 1;
|
var jeopardyVolume = 1;
|
||||||
@ -179,7 +180,7 @@ function stopSchweinchen() {
|
|||||||
var index = $("#questionsSelcet>option:selected").index();
|
var index = $("#questionsSelcet>option:selected").index();
|
||||||
$("#questionsSelcet").val(index+1);
|
$("#questionsSelcet").val(index+1);
|
||||||
changeFrage();
|
changeFrage();
|
||||||
|
|
||||||
$("#schweinchenImg").hide();
|
$("#schweinchenImg").hide();
|
||||||
$("#answers").show();
|
$("#answers").show();
|
||||||
if(schweinchen) {
|
if(schweinchen) {
|
||||||
@ -200,6 +201,7 @@ function showIntro() {
|
|||||||
$(".intro").show();
|
$(".intro").show();
|
||||||
if(sounds && (display || serverSound)) {
|
if(sounds && (display || serverSound)) {
|
||||||
intro = new Audio('./sounds/intro.mp3');
|
intro = new Audio('./sounds/intro.mp3');
|
||||||
|
intro.volume = introVolume;
|
||||||
intro.play();
|
intro.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,8 +122,9 @@ var connectWs = function() {
|
|||||||
} else if(key == "hideIntro") {
|
} else if(key == "hideIntro") {
|
||||||
hideIntro();
|
hideIntro();
|
||||||
} else if(key == "setIntroVolume") {
|
} else if(key == "setIntroVolume") {
|
||||||
|
introVolume = value;
|
||||||
if(intro != null)
|
if(intro != null)
|
||||||
intro.volume = value;
|
intro.volume = introVolume;
|
||||||
} else if(key == "setLeftPoints") {
|
} else if(key == "setLeftPoints") {
|
||||||
setLeftPoints(value);
|
setLeftPoints(value);
|
||||||
} else if(key == "setRightPoints") {
|
} else if(key == "setRightPoints") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user