| <!doctype html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <video id="video" autoplay=""></video> |
| <script> |
| promise_test(async test => { |
| if (window.internals) { |
| internals.settings.setAllowsInlineMediaPlayback(true); |
| internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(true); |
| } |
| video.srcObject = await navigator.mediaDevices.getUserMedia({ video : true }); |
| test.add_cleanup(() => video.srcObject.getTracks().forEach(track => track.stop())); |
| return video.play(); |
| }); |
| </script> |
| </body> |
| </html> |