Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Queries for media devices on the current system using the getMediaDevices | 8 * Queries for media devices on the current system using the getMediaDevices |
| 9 * API. | 9 * API. |
| 10 * | 10 * |
| 11 * Returns the list of devices available. | 11 * Returns the list of devices available. |
| 12 */ | 12 */ |
| 13 function getMediaDevices() { | 13 function getMediaDevices() { |
| 14 navigator.getMediaDevices(function(devices) { | 14 navigator.mediaDevices.enumerateDevices().then(function(devices) { |
| 15 returnToTest(JSON.stringify(devices)); | 15 returnToTest(JSON.stringify(devices)); |
| 16 }); | 16 }); |
| 17 } | 17 } |
|
hbos_chromium
2016/11/03 10:25:40
This change affects this code, right?
https://cs.c
Guido Urdaneta
2016/11/03 11:41:10
Nice catch. I'll address the issues with this test
| |
| 18 | |
| 19 /** | |
| 20 * Queries for media sources on the current system using the getSources API. | |
| 21 * | |
| 22 * Returns the list of sources available. | |
| 23 */ | |
| 24 function getSources() { | |
| 25 MediaStreamTrack.getSources(function(sources) { | |
| 26 returnToTest(JSON.stringify(sources)); | |
| 27 }); | |
| 28 } | |
| 29 | |
| OLD | NEW |