blob: 27838eb254b552cb3f2f51f8ccc3aa37de342208 [file] [log] [blame]
<html>
<head>
<script>
var timeout;
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 id="test-video" src="video-without-audio.mp4" controls width=640 height=480></video>
</body>
</html>