fix volume init

master
orphevs 2017-12-09 19:00:07 +01:00
parent 0db3dea3db
commit 8ec6df576d
2 changed files with 5 additions and 2 deletions

View File

@ -274,16 +274,19 @@ var volume = document.querySelector('.volume');
var audio_musique = new Audio(); var audio_musique = new Audio();
audio_musique.src = 'assets/sounds/song.mp3'; audio_musique.src = 'assets/sounds/song.mp3';
audio_tir.volume = 0.15; audio_musique.volume = 0.10;
var audio_tir = new Audio(); var audio_tir = new Audio();
audio_tir.src = 'assets/sounds/laser.wav'; audio_tir.src = 'assets/sounds/laser.wav';
audio_tir.volume = 0.15;
var audio_gameover = new Audio(); var audio_gameover = new Audio();
audio_gameover.src = 'assets/sounds/gameover.wav'; audio_gameover.src = 'assets/sounds/gameover.wav';
audio_gameover.volume = 0.15;
var audio_touche = new Audio(); var audio_touche = new Audio();
audio_touche.src = 'assets/sounds/touche.wav'; audio_touche.src = 'assets/sounds/touche.wav';
audio_touche.volume = 0.15;
replay.addEventListener('click', function(){ replay.addEventListener('click', function(){
startmenu.style.display = 'block'; startmenu.style.display = 'block';

View File

@ -33,7 +33,7 @@
</div> </div>
<div id="mute" class="mute"></div> <div id="mute" class="mute"></div>
<div class="volume"> <div class="volume">
<input type="range" min="0" max="100" step="1" oninput="SetVolume(this.value)" onchange="SetVolume(this.value)"></input> <input type="range" min="0" max="100" step="1" value="10" oninput="SetVolume(this.value)" onchange="SetVolume(this.value)"></input>
</div> </div>
<div class="line line-1"> <div class="line line-1">
<div class="col col-1"></div> <div class="col col-1"></div>