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

Unified Diff: chrome/test/data/webrtc/media_devices.js

Issue 2489823002: Revert "Remove MediaStreamTrack.getSources()." (Closed)
Patch Set: rebase 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: chrome/test/data/webrtc/media_devices.js
diff --git a/chrome/test/data/webrtc/media_devices.js b/chrome/test/data/webrtc/media_devices.js
index 0780dd5e5a87992907ab4e2e8a0e93595c51a976..38a7238ccef3e3e907b6af1936af3be4ea1bc4e6 100644
--- a/chrome/test/data/webrtc/media_devices.js
+++ b/chrome/test/data/webrtc/media_devices.js
@@ -11,7 +11,19 @@
* Returns the list of devices available.
*/
function getMediaDevices() {
- navigator.mediaDevices.enumerateDevices().then(function(devices) {
+ navigator.getMediaDevices(function(devices) {
returnToTest(JSON.stringify(devices));
});
}
+
+/**
+ * Queries for media sources on the current system using the getSources API.
+ *
+ * Returns the list of sources available.
+ */
+function getSources() {
+ MediaStreamTrack.getSources(function(sources) {
+ returnToTest(JSON.stringify(sources));
+ });
+}
+

Powered by Google App Engine
This is Rietveld 408576698