OLD | NEW |
1 /** | 1 /** |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 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 * The ID of the video tag from which frames are captured. | 8 * The ID of the video tag from which frames are captured. |
9 * @private | 9 * @private |
10 */ | 10 */ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 var gWebSocketOpened = false; | 55 var gWebSocketOpened = false; |
56 | 56 |
57 /** | 57 /** |
58 * We need to skip the first two frames due to timing issues. This flags helps | 58 * We need to skip the first two frames due to timing issues. This flags helps |
59 * us determine weather or not to skip them. | 59 * us determine weather or not to skip them. |
60 * @private | 60 * @private |
61 */ | 61 */ |
62 var gFrameIntervalAdjustment = false; | 62 var gFrameIntervalAdjustment = false; |
63 | 63 |
64 /** | 64 /** |
65 * We need this global variable to syncronyze with PyAuto how long to run the | 65 * We need this global variable to synchronize with the test how long to run the |
66 * call between the two peers. | 66 * call between the two peers. |
67 */ | 67 */ |
68 var dDoneFrameCapturing = false; | 68 var dDoneFrameCapturing = false; |
69 | 69 |
70 /** | 70 /** |
71 * Upon load of the window opens the WebSocket to the PyWebSocket server. The | 71 * Upon load of the window opens the WebSocket to the PyWebSocket server. The |
72 * server should already be up and running. | 72 * server should already be up and running. |
73 */ | 73 */ |
74 window.onload = function() { | 74 window.onload = function() { |
75 tryOpeningWebSocket(); | 75 tryOpeningWebSocket(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 }; | 234 }; |
235 | 235 |
236 gWebSocket.onerror = function (error) { | 236 gWebSocket.onerror = function (error) { |
237 console.log('WebSocket Error ' + error); | 237 console.log('WebSocket Error ' + error); |
238 }; | 238 }; |
239 | 239 |
240 gWebSocket.onmessage = function (e) { | 240 gWebSocket.onmessage = function (e) { |
241 console.log('Server says: ' + e.data); | 241 console.log('Server says: ' + e.data); |
242 }; | 242 }; |
243 } | 243 } |
OLD | NEW |