summaryrefslogtreecommitdiff
path: root/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-check-frame.html
blob: 2c43fda1a43300381d5e42c47dbb8db2a8472227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<html>
    <head>
        <script>
            function pageLoaded() {
                document.getElementById("video").play().then(function() {
                    window.parent.postMessage('autoplayed', '*');
                }).catch(function() {
                    window.parent.postMessage('did-not-play', '*');
                });
            }
        </script>
    </head>
    <body onload="pageLoaded()">
        <video id="video" playsinline src="test.mp4" />
    </body>
</html>