OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title>getUserMedia: test that mediaDevices.getUserMedia is present</title> | |
5 <link rel="author" title="Dr Alex Gouaillard" href="mailto:agouaillard@gmail.com
"/> | |
6 <link rel="help" href="https://w3c.github.io/mediacapture-main/#mediadevices-int
erface-extensions"> | |
7 <meta name='assert' content='Check that the mediaDevices.getUserMedia() method i
s present.'/> | |
8 </head> | |
9 <body> | |
10 <h1 class="instructions">Description</h1> | |
11 <p class="instructions">This test checks for the presence of the | |
12 <code>navigator.mediaDevices.getUserMedia</code> method.</p> | |
13 <div id='log'></div> | |
14 <script src=/resources/testharness.js></script> | |
15 <script src=/resources/testharnessreport.js></script> | |
16 <script> | |
17 test(function () { | |
18 assert_true(undefined !== navigator.mediaDevices.getUserMedia, "navigator.medi
aDevices.getUserMedia exists."); | |
19 // TODO: do some stuff with it | |
20 assert_true(undefined !== navigator.mediaDevices.getSupportedConstraints, "nav
igator.mediaDevices.getSupportedConstraints exists."); | |
21 var list = navigator.mediaDevices.getSupportedConstraints(); | |
22 // TODO: we are supposed to check that all values returned can be used in a co
nstraint .... | |
23 // NOTE: the current list of attributes that may or may not be here | |
24 // ... FF for example has many no tin that list, should we fail if an attrib
ute is present but not listed in the specs? | |
25 // list.width | |
26 // list.height | |
27 // list.aspectRatio | |
28 // list.frameRate | |
29 // list.facingMode | |
30 // list.volume | |
31 // list.sampleRate | |
32 // list.sampleSize | |
33 // list.echoCancellation | |
34 // list.latency | |
35 // list.channelCount | |
36 // list.deviceId | |
37 // list.groupId | |
38 }, "mediaDevices.getUserMedia() is present on navigator"); | |
39 </script> | |
40 </body> | |
41 </html> | |
OLD | NEW |