blob: b9905311c4c25b5449a27792e37ce510c048f357 [file] [log] [blame]
<html>
<head>
<script>
function pageLoaded() {
try {
window.webkit.messageHandlers.testHandler.postMessage("loaded");
} catch(e) { }
}
function beganPlaying() {
try {
window.webkit.messageHandlers.testHandler.postMessage("played");
} catch(e) { }
}
function play() {
let audio = document.getElementById("audio");
audio.playbackRate = 5; // Speeds up the test.
audio.play();
}
</script>
</head>
<body onload="pageLoaded()">
<button id="playButton" onclick="play()">Play</button>
<br />
<audio controls id="audio" onplaying="beganPlaying()" src="silence-long.m4a" />
</body>
</html>