blob: 3fe64ab9023af8232dac56288b33f261b1c101ff [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-without-audio.mp4" webkit-playsinline></video>
</body>
</html>