<html> | |
<head> | |
<script> | |
function pageLoaded() { | |
try { | |
window.webkit.messageHandlers.testHandler.postMessage("loaded"); | |
} catch(e) { } | |
} | |
function play() { | |
document.getElementById("video").play(); | |
} | |
</script> | |
</head> | |
<body onload="pageLoaded()"> | |
<button onclick="play()">Play</button> | |
<video id="video" autoplay src="test.mp4" /> | |
</body> | |
</html> |