Browse Source

Merge pull request #201 from slr/issp-fix-ntf-snd

fix default value of sound notification, fix player for mentions
master
miguelfreitas 10 years ago
parent
commit
60ff4cad8c
  1. 8
      js/options.js

8
js/options.js

@ -44,7 +44,7 @@ var TwisterOptions = function() @@ -44,7 +44,7 @@ var TwisterOptions = function()
this.volumeControl = function() {
var playerVol = $('#playerVol');
playerVol[0].value = $.Options.getOption(playerVol[0].id, 100);
playerVol[0].value = $.Options.getOption(playerVol[0].id, 1);
$('.volValue').text((playerVol[0].value * 100).toFixed());
playerVol.on('change',function(){
@ -67,14 +67,14 @@ var TwisterOptions = function() @@ -67,14 +67,14 @@ var TwisterOptions = function()
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+sndDM+'.ogg');
}
player[0].volume = $.Options.getOption('playerVol',100);
player[0].volume = $.Options.getOption('playerVol',1);
player[0].play();
}
this.mensNotif = function() {
var sndMention = $.Options.getOption('sndMention', "false");
if(sndMention == "false") return;
var player = $('#player');
var player = $('#playerSec');
$('#playerSec').empty();
if (player[0].canPlayType('audio/mpeg;')) {
@ -84,7 +84,7 @@ var TwisterOptions = function() @@ -84,7 +84,7 @@ var TwisterOptions = function()
player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+sndMention+'.ogg');
}
player[0].volume = $.Options.getOption('playerVol',100);
player[0].volume = $.Options.getOption('playerVol',1);
player[0].play();
}

Loading…
Cancel
Save