gecko-dev/dom/browser-element/mochitest/file_browserElement_ActiveS...

37 строки
677 B
HTML

<!DOCTYPE HTML>
<html>
<body>
<script type="application/javascript;version=1.7">
var audio = new Audio();
audio.src = "audio.ogg";
audio.loop = true;
function runCommands()
{
switch(location.hash) {
case '#play':
audio.play();
break;
case '#mute':
audio.muted = true;
break;
case '#unmute':
audio.muted = false;
break;
case '#volume-0':
audio.volume = 0.0;
break;
case '#volume-1':
audio.volume = 1.0;
break;
case '#pause':
audio.pause();
break;
default :
alert("Undefined command!");
}
}
window.addEventListener('hashchange', runCommands);
</script>
</body>
</html>