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

Side by Side Diff: content/browser/resources/media/main.js

Issue 643343004: Video Capture Capabilities available on chrome://media-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 2 months 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * A global object that gets used by the C++ interface. 6 * A global object that gets used by the C++ interface.
7 */ 7 */
8 var media = (function() { 8 var media = (function() {
9 'use strict'; 9 'use strict';
10 10
(...skipping 21 matching lines...) Expand all
32 BAR_HEIGHT: 25 32 BAR_HEIGHT: 25
33 }; 33 };
34 34
35 /** 35 /**
36 * Users of |media| must call initialize prior to calling other methods. 36 * Users of |media| must call initialize prior to calling other methods.
37 */ 37 */
38 media.initialize = function(theManager) { 38 media.initialize = function(theManager) {
39 manager = theManager; 39 manager = theManager;
40 }; 40 };
41 41
42 media.onReceiveAudioStreamData = function(everything) { 42 media.onReceiveAudioStreamData = function(audioStreamData) {
43 for (var component in everything) { 43 for (var component in audioStreamData) {
44 media.updateAudioComponent(everything[component]); 44 media.updateAudioComponent(audioStreamData[component]);
45 } 45 }
46 }; 46 };
47 47
48 media.onReceiveVideoCaptureCapabilities = function(videoCaptureCapabilities) {
49 manager.updateVideoCaptureCapabilities(videoCaptureCapabilities)
50 console.log("Video capabilities", videoCaptureCapabilities);
51 }
52
48 media.onReceiveConstants = function(constants) { 53 media.onReceiveConstants = function(constants) {
49 for (var key in constants.eventTypes) { 54 for (var key in constants.eventTypes) {
50 var value = constants.eventTypes[key]; 55 var value = constants.eventTypes[key];
51 eventTypes[value] = key; 56 eventTypes[value] = key;
52 } 57 }
53 58
54 for (var key in constants.eventPhases) { 59 for (var key in constants.eventPhases) {
55 var value = constants.eventPhases[key]; 60 var value = constants.eventPhases[key];
56 eventPhases[value] = key; 61 eventPhases[value] = key;
57 } 62 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 source, event.ticksMillis, 'EVENT', event.type); 180 source, event.ticksMillis, 'EVENT', event.type);
176 } 181 }
177 }; 182 };
178 183
179 // |chrome| is not defined during tests. 184 // |chrome| is not defined during tests.
180 if (window.chrome && window.chrome.send) { 185 if (window.chrome && window.chrome.send) {
181 chrome.send('getEverything'); 186 chrome.send('getEverything');
182 } 187 }
183 return media; 188 return media;
184 }()); 189 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698