I'm creating an audio player with custom playback and volume controls. I have created a mute toggle and volume slider that works fine in Chrome but not in Firefox. I saw THIS link and it looks like this may be a bug that has YET to be resolved.
HTML:
<audio id="audio" style="width:800px;">
<source src="video/NMGTT.mp3" type="audio/mp3">
</audio>
<div id="media-controls">
<button type="button" id="play-pause" class="paused" >PLAY/PAUSE</button>
<button type="button" id="rewind10" >REWIND 10 SECONDS</button>
<button type="button" id="loop" >LOOP</button>
<input id="seekslider" type="range" min="0" max="100" value="0">
<span id="curtimetext">00:00</span> / <span id="durtimetext">00:00</span>
<div id="fullVolume">
<button id="mutebtn" >MUTE</button>
<div id="volumeContainer"><input id="volumeslider" type="range" min="0" max="100" value="100" step="1" class="vertical" orient="vertical"></div>
</div>
</div>
JS:
var track = document.getElementById('audio');
mutebtn = document.getElementById("mutebtn");
mutebtn.addEventListener("click",vidmute);
function vidmute(){
if(track.muted){
track.muted = false;
} else {
track.muted = true;
}
}
Reminder: This issue is in FIREFOX only.