blob: 002613a8ce48a76c17b8a1bfcd6a857cc3e2ec2e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
function go() {
var video = document.getElementsByTagName('video')[0];
video.play().then(playing).catch(notPlaying);
}
function playing() {
try {
window.webkit.messageHandlers.testHandler.postMessage('playing');
} catch(e) {
window.location = 'callback:playing';
}
}
function notPlaying() {
try {
window.webkit.messageHandlers.testHandler.postMessage('not playing');
} catch(e) { }
}
</script>
</head>
<body onload="go()">
<video src="video-with-audio.mp4" muted webkit-playsinline></video>
</body>
</html>