OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
7 | 7 |
8 (function() { | 8 (function() { |
9 'use strict'; | 9 'use strict'; |
10 | 10 |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 units = 'MiBps'; | 461 units = 'MiBps'; |
462 videoBandwidth = videoBandwidth / 1048576; | 462 videoBandwidth = videoBandwidth / 1048576; |
463 } else { | 463 } else { |
464 units = 'GiBps'; | 464 units = 'GiBps'; |
465 videoBandwidth = videoBandwidth / 1073741824; | 465 videoBandwidth = videoBandwidth / 1073741824; |
466 } | 466 } |
467 | 467 |
468 var statistics = document.getElementById('statistics'); | 468 var statistics = document.getElementById('statistics'); |
469 statistics.innerText = | 469 statistics.innerText = |
470 'Bandwidth: ' + videoBandwidth.toFixed(2) + units + | 470 'Bandwidth: ' + videoBandwidth.toFixed(2) + units + |
471 ', Framerate: ' + | |
Wez
2011/10/21 18:01:43
Framerate -> Frame Rate
| |
472 (stats['video_frame_rate'] ? | |
473 stats['video_frame_rate'].toFixed(2) + ' fps' : 'n/a') + | |
471 ', Capture: ' + stats['capture_latency'].toFixed(2) + 'ms' + | 474 ', Capture: ' + stats['capture_latency'].toFixed(2) + 'ms' + |
472 ', Encode: ' + stats['encode_latency'].toFixed(2) + 'ms' + | 475 ', Encode: ' + stats['encode_latency'].toFixed(2) + 'ms' + |
473 ', Decode: ' + stats['decode_latency'].toFixed(2) + 'ms' + | 476 ', Decode: ' + stats['decode_latency'].toFixed(2) + 'ms' + |
474 ', Render: ' + stats['render_latency'].toFixed(2) + 'ms' + | 477 ', Render: ' + stats['render_latency'].toFixed(2) + 'ms' + |
475 ', Latency: ' + stats['roundtrip_latency'].toFixed(2) + 'ms'; | 478 ', Latency: ' + stats['roundtrip_latency'].toFixed(2) + 'ms'; |
476 | 479 |
477 // Update the stats once per second. | 480 // Update the stats once per second. |
478 window.setTimeout(updateStatistics, 1000); | 481 window.setTimeout(updateStatistics, 1000); |
479 } | 482 } |
480 | 483 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
776 } | 779 } |
777 } | 780 } |
778 | 781 |
779 function recenterToolbar_() { | 782 function recenterToolbar_() { |
780 var toolbar = document.getElementById('session-toolbar'); | 783 var toolbar = document.getElementById('session-toolbar'); |
781 var toolbarX = (window.innerWidth - toolbar.clientWidth) / 2; | 784 var toolbarX = (window.innerWidth - toolbar.clientWidth) / 2; |
782 toolbar.style['left'] = toolbarX + 'px'; | 785 toolbar.style['left'] = toolbarX + 'px'; |
783 } | 786 } |
784 | 787 |
785 }()); | 788 }()); |
OLD | NEW |