OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 }; | 40 }; |
41 | 41 |
42 media.onReceiveAudioStreamData = function(audioStreamData) { | 42 media.onReceiveAudioStreamData = function(audioStreamData) { |
43 for (var component in audioStreamData) { | 43 for (var component in audioStreamData) { |
44 media.updateAudioComponent(audioStreamData[component]); | 44 media.updateAudioComponent(audioStreamData[component]); |
45 } | 45 } |
46 }; | 46 }; |
47 | 47 |
48 media.onReceiveVideoCaptureCapabilities = function(videoCaptureCapabilities) { | 48 media.onReceiveVideoCaptureCapabilities = function(videoCaptureCapabilities) { |
49 manager.updateVideoCaptureCapabilities(videoCaptureCapabilities) | 49 manager.updateVideoCaptureCapabilities(videoCaptureCapabilities) |
50 console.log("Video capabilities", videoCaptureCapabilities); | |
51 } | 50 } |
52 | 51 |
53 media.onReceiveConstants = function(constants) { | 52 media.onReceiveConstants = function(constants) { |
54 for (var key in constants.eventTypes) { | 53 for (var key in constants.eventTypes) { |
55 var value = constants.eventTypes[key]; | 54 var value = constants.eventTypes[key]; |
56 eventTypes[value] = key; | 55 eventTypes[value] = key; |
57 } | 56 } |
58 | 57 |
59 for (var key in constants.eventPhases) { | 58 for (var key in constants.eventPhases) { |
60 var value = constants.eventPhases[key]; | 59 var value = constants.eventPhases[key]; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 source, event.ticksMillis, 'EVENT', event.type); | 179 source, event.ticksMillis, 'EVENT', event.type); |
181 } | 180 } |
182 }; | 181 }; |
183 | 182 |
184 // |chrome| is not defined during tests. | 183 // |chrome| is not defined during tests. |
185 if (window.chrome && window.chrome.send) { | 184 if (window.chrome && window.chrome.send) { |
186 chrome.send('getEverything'); | 185 chrome.send('getEverything'); |
187 } | 186 } |
188 return media; | 187 return media; |
189 }()); | 188 }()); |
OLD | NEW |