blob: ecc3c884e8de8f7d8b3fc05a58a657bb4d4c6f1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<html>
<head>
<script>
function pageLoaded() {
document.getElementById("video").play().then(function() {
try {
window.webkit.messageHandlers.testHandler.postMessage("autoplayed");
} catch(e) { }
}).catch(function() {
try {
window.webkit.messageHandlers.testHandler.postMessage("did-not-play");
} catch(e) { }
});
}
</script>
</head>
<body onload="pageLoaded()">
<video id="video" playsinline src="test.mp4" />
</body>
</html>
|