blob: 33485d9a2b304fb92da7008bc8d15f4f12655b5c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
window.addEventListener('load', event => {
let context = new webkitAudioContext();
let node = context.createBufferSource();
node.connect(context.destination);
let video = document.querySelector('video');
Promise.all([context.resume(), video.play()]).then(() => {
window.webkit.messageHandlers.testHandler.postMessage('playing');
}, () => {
window.webkit.messageHandlers.testHandler.postMessage('not playing');
});
});
</script>
</head>
<video src="video-with-audio.mp4"></video>
</html>