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

Side by Side Diff: content/test/data/media/getusermedia.html

Issue 2471803002: Remove MediaStreamTrack.getSources(). (Closed)
Patch Set: Remove from UseCounter.h and Deprecation.cpp 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 $ = function(id) { 5 $ = function(id) {
6 return document.getElementById(id); 6 return document.getElementById(id);
7 }; 7 };
8 8
9 setAllEventsOccuredHandler(function() { 9 setAllEventsOccuredHandler(function() {
10 reportTestSuccess(); 10 reportTestSuccess();
11 }); 11 });
12 12
13 function getSources() { 13 function getSources() {
14 MediaStreamTrack.getSources(function(devices) { 14 navigator.mediaDevices.enumerateDevices().then(function(devices) {
15 document.title = 'Media devices available'; 15 document.title = 'Media devices available';
16 var results = []; 16 var results = [];
17 for (var device, i = 0; device = devices[i]; ++i) { 17 for (var device, i = 0; device = devices[i]; ++i) {
18 if (device.kind != "audioinput" && device.kind != "videoinput")
19 continue;
18 results.push({ 20 results.push({
19 'id': device.id, 21 'id': device.deviceId,
20 'kind': device.kind, 22 'kind': device.kind == "audioinput" ? "audio" : "video",
21 'label': device.label, 23 'label': device.label,
22 'facing': device.facing 24 'facing': ""
hbos_chromium 2016/11/03 10:25:40 I don't think this is used, can 'facing' be remove
Guido Urdaneta 2016/11/03 11:41:10 I'll keep it for compatibility for now.
23 }); 25 });
24 } 26 }
25 sendValueToTest(JSON.stringify(results)); 27 sendValueToTest(JSON.stringify(results));
26 }); 28 });
27 } 29 }
28 30
29 // Creates a MediaStream and renders it locally. When the video is detected to 31 // Creates a MediaStream and renders it locally. When the video is detected to
30 // be rolling, the stream should be stopped. 32 // be rolling, the stream should be stopped.
31 function getUserMediaAndStop(constraints) { 33 function getUserMediaAndStop(constraints) {
32 console.log('Calling getUserMediaAndStop. constraints : ' + 34 console.log('Calling getUserMediaAndStop. constraints : ' +
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 </tr> 542 </tr>
541 <tr> 543 <tr>
542 <td><video id="local-view-2" width="320" height="240" autoplay 544 <td><video id="local-view-2" width="320" height="240" autoplay
543 style="display:none"></video></td> 545 style="display:none"></video></td>
544 <td><canvas id="local-view-2-canvas" width="320" height="240" 546 <td><canvas id="local-view-2-canvas" width="320" height="240"
545 style="display:none"></canvas></td> 547 style="display:none"></canvas></td>
546 </tr> 548 </tr>
547 </table> 549 </table>
548 </body> 550 </body>
549 </html> 551 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698