summaryrefslogtreecommitdiff
path: root/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-no-audio-check.html
blob: dc1cc7325e496a7551760637cb29617c77e5d35b (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-without-audio-track.mp4" />
    </body>
</html>