Loosen audio playback restrictions when the volume is 0.
[WebKit-https.git] / Tools / TestWebKitAPI / Tests / WebKit2 / autoplay-zero-volume-check.html
1 <html>
2     <head>
3         <script>
4             function pageLoaded() {
5                 var video = document.getElementById("video");
6                 video.volume = 0;
7                 video.play().then(function() {
8                     try {
9                         window.webkit.messageHandlers.testHandler.postMessage("autoplayed");
10                     } catch(e) { }
11                 }).catch(function() {
12                     try {
13                         window.webkit.messageHandlers.testHandler.postMessage("did-not-play");
14                     } catch(e) { }
15                 });
16             }
17         </script>
18     </head>
19     <body onload="pageLoaded()">
20         <video id="video" playsinline src="test.mp4" />
21     </body>
22 </html>