Revision 7208979a308347c4379e0669b83de1a013176a2b authored by Yutaka Hirano on 24 April 2018, 07:30:37 UTC, committed by Yutaka Hirano on 24 April 2018, 07:30:37 UTC
1 parent 5acf250
MediaStreamTrack-getCapabilities.https.html
<!doctype html>
<title>MediaStreamTrack GetCapabilities</title>
<p class="instructions">This test checks for the presence of audio and video properties in
<code>MediaStreamTrack.getCapabilities()</code> method.</p>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
promise_test(() => {
return navigator.mediaDevices.getUserMedia({audio: true, video: true})
.then(stream => {
var audioCapabilities = stream.getAudioTracks()[0].getCapabilities();
var videoCapabilities = stream.getVideoTracks()[0].getCapabilities();
assert_true(undefined !== audioCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for an audio track.");
assert_true(undefined !== audioCapabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist for an audio track.");
assert_true(undefined !== audioCapabilities.autoGainControl, "MediaTrackCapabilities's autoGainControl should exist for an audio track.");
assert_true(undefined !== audioCapabilities.noiseSuppression, "MediaTrackCapabilities's noiseSuppression should exist for an audio track.");
assert_true(undefined !== videoCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for a video track.");
});
});
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...