forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support MediaStreamTrack.getCapabilities() for echoCancellation and d…
…eviceId Intent to implement and ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/h4sCuIqb_78 Bug: 293292 Change-Id: Ib1869d4e940cffb3012572451268dec1ffb55a0e Reviewed-on: https://chromium-review.googlesource.com/899402 Commit-Queue: Guido Urdaneta <guidou@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#536709}
- Loading branch information
1 parent
f6e2201
commit c9a6d48
Showing
9 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...LayoutTests/external/wpt/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!doctype html> | ||
<title>MediaStreamTrack GetCapabilities</title> | ||
<p class="instructions">This test checks for the presence of | ||
<code>echoCancellation</code> and <code>deviceId</code> fields | ||
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}) | ||
.then(stream => { | ||
var capabilities = stream.getAudioTracks()[0].getCapabilities(); | ||
assert_true(undefined !== capabilities.deviceId, "MediaTrackCapabilities's deviceId should exist."); | ||
assert_true(undefined !== capabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist."); | ||
}); | ||
}); | ||
</script> |
15 changes: 15 additions & 0 deletions
15
third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE HTML> | ||
<script src="../../resources/testharness.js"></script> | ||
<script src="../../resources/testharnessreport.js"></script> | ||
<script> | ||
promise_test(function() { | ||
return navigator.mediaDevices.getUserMedia({audio: true}) | ||
.then(function(stream) { | ||
var capabilities = stream.getAudioTracks()[0].getCapabilities(); | ||
assert_greater_than(Object.keys(capabilities).length, 0); | ||
assert_true(capabilities.hasOwnProperty('echoCancellation')); | ||
assert_true(capabilities.hasOwnProperty('deviceId')); | ||
assert_equals(Object.keys(capabilities.echoCancellation).length, 2); | ||
}); | ||
}, 'MediaStreamTrack.getCapabilities() support for echoCancellation and deviceId'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters