Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2130)

Unified Diff: content/test/data/media/getusermedia.html

Issue 2493823002: Revert of Revert "Remove MediaStreamTrack.getSources()." (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/data/media/getusermedia.html
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html
index e8aac18fa23ff874324853323a95a16727146d84..49b2beced94c9c58e83ad4489b6fce70fd80393b 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -11,15 +11,17 @@
});
function getSources() {
- MediaStreamTrack.getSources(function(devices) {
+ navigator.mediaDevices.enumerateDevices().then(function(devices) {
document.title = 'Media devices available';
var results = [];
for (var device, i = 0; device = devices[i]; ++i) {
+ if (device.kind != "audioinput" && device.kind != "videoinput")
+ continue;
results.push({
- 'id': device.id,
- 'kind': device.kind,
+ 'id': device.deviceId,
+ 'kind': device.kind == "audioinput" ? "audio" : "video",
'label': device.label,
- 'facing': device.facing
+ 'facing': ""
});
}
sendValueToTest(JSON.stringify(results));

Powered by Google App Engine
This is Rietveld 408576698