OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 /** | 6 /** |
7 * Provides the UI for dump creation. | 7 * Provides the UI for dump creation. |
8 */ | 8 */ |
9 var DumpCreator = (function() { | 9 var DumpCreator = (function() { |
10 /** | 10 /** |
(...skipping 15 matching lines...) Expand all Loading... |
26 this.root_.appendChild(summary); | 26 this.root_.appendChild(summary); |
27 summary.textContent = 'Create Dump'; | 27 summary.textContent = 'Create Dump'; |
28 var content = document.createElement('div'); | 28 var content = document.createElement('div'); |
29 this.root_.appendChild(content); | 29 this.root_.appendChild(content); |
30 | 30 |
31 content.innerHTML = '<div><a><button>' + | 31 content.innerHTML = '<div><a><button>' + |
32 'Download the PeerConnection updates and stats data' + | 32 'Download the PeerConnection updates and stats data' + |
33 '</button></a></div>' + | 33 '</button></a></div>' + |
34 '<p><label><input type=checkbox>' + | 34 '<p><label><input type=checkbox>' + |
35 'Enable diagnostic audio recordings</label></p>' + | 35 'Enable diagnostic audio recordings</label></p>' + |
36 '<p class=audio-recordings-info>A diagnostic audio recording is used' + | 36 '<p class=audio-diagnostic-dumps-info>A diagnostic audio recording is' + |
37 ' for analyzing audio problems. It consists of two files and contains' + | 37 ' used for analyzing audio problems. It consists of two files and' + |
38 ' the audio played out from the speaker and recorded from the' + | 38 ' contains the audio played out from the speaker and recorded from' + |
39 ' microphone and is saved to the local disk. Checking this box will' + | 39 ' the microphone and is saved to the local disk. Checking this box' + |
40 ' enable the recording for ongoing WebRTC calls and for future WebRTC' + | 40 ' will enable the recording for ongoing WebRTC calls and for future' + |
41 ' calls. When the box is unchecked or this page is closed, all' + | 41 ' WebRTC calls. When the box is unchecked or this page is closed, all' + |
42 ' ongoing recordings will be stopped and this recording' + | 42 ' ongoing recordings will be stopped and this recording' + |
43 ' functionality will be disabled for future WebRTC calls. Recordings' + | 43 ' functionality will be disabled for future WebRTC calls. Recordings' + |
44 ' in multiple tabs are supported as well as multiple recordings in' + | 44 ' in multiple tabs are supported as well as multiple recordings in' + |
45 ' the same tab. When enabling, you select a base filename to which' + | 45 ' the same tab. When enabling, you select a base filename to which' + |
46 ' suffixes will be appended as</p>' + | 46 ' suffixes will be appended as</p>' + |
47 '<p><div><base filename>.<render process ID>' + | 47 '<p><div><base filename>.<render process ID>' + |
48 '.aec_dump.<recording ID></div>' + | 48 '.aec_dump.<recording ID></div>' + |
49 '<div><base filename>.<render process ID>' + | 49 '<div><base filename>.<render process ID>' + |
50 '.source_input.<stream ID>.wav</div></p>' + | 50 '.source_input.<stream ID>.wav</div></p>' + |
51 '<p class=audio-recordings-info>If recordings are disabled and then' + | 51 '<p class=audio-diagnostic-dumps-info>If recordings are disabled and' + |
52 ' enabled using the same base filename, the microphone recording file' + | 52 ' then enabled using the same base filename, the microphone recording' + |
53 ' will be overwritten, and the AEC dump file will be appended to and' + | 53 ' file will be overwritten, and the AEC dump file will be appended to' + |
54 ' may become invalid. It is recommended to choose a new base filename' + | 54 ' and may become invalid. It is recommended to choose a new base' + |
55 ' each time or move the produced files before enabling again.</p>' + | 55 ' filename each time or move the produced files before enabling' + |
| 56 ' again.</p>' + |
56 '<p><label><input type=checkbox>' + | 57 '<p><label><input type=checkbox>' + |
57 'Enable diagnostic packet and event recording</label></p>' + | 58 'Enable diagnostic packet and event recording</label></p>' + |
58 '<p class=audio-recordings-info>A diagnostic packet and event' + | 59 '<p class=audio-diagnostic-dumps-info>A diagnostic packet and event' + |
59 ' recording can be used for analyzing various issues related to' + | 60 ' recording can be used for analyzing various issues related to' + |
60 ' thread starvation, jitter buffers or bandwidth estimation. Two' + | 61 ' thread starvation, jitter buffers or bandwidth estimation. Two' + |
61 ' types of data are logged. First, incoming and outgoing RTP headers' + | 62 ' types of data are logged. First, incoming and outgoing RTP headers' + |
62 ' and RTCP packets are logged. These do not include any audio or' + | 63 ' and RTCP packets are logged. These do not include any audio or' + |
63 ' video information, nor any other types of personally identifiable' + | 64 ' video information, nor any other types of personally identifiable' + |
64 ' information (so no IP addresses or URLs). Checking this box will' + | 65 ' information (so no IP addresses or URLs). Checking this box will' + |
65 ' enable the recording for currently ongoing WebRTC calls. When' + | 66 ' enable the recording for ongoing WebRTC calls and for future' + |
66 ' the box is unchecked or this page is closed, all active recordings' + | 67 ' WebRTC calls. When the box is unchecked or this page is closed,' + |
67 ' will be stopped. Recording in multiple tabs or multiple recordings' + | 68 ' all ongoing recordings will be stopped and this recording' + |
68 ' in the same tab is currently not supported. When enabling, a' + | 69 ' functionality will be disabled for future WebRTC calls. Recording' + |
69 ' filename for the recording can be selected. If an existing file is' + | 70 ' in multiple tabs or multiple recordings in the same tab will cause' + |
70 ' selected, it will be overwritten. </p>'; | 71 ' multiple log files to be created. When enabling, a filename for the' + |
| 72 ' recording can be entered. The entered filename is used as a' + |
| 73 ' base, to which the following suffixes will be appended.</p>' + |
| 74 ' <p><base filename>.<render process ID>' + |
| 75 '.<recording ID></p>' + |
| 76 '<p class=audio-diagnostic-dumps-info>If a file with the same name' + |
| 77 ' already exists, it will be' + |
| 78 ' overwritten. </p>'; |
71 content.getElementsByTagName('a')[0].addEventListener( | 79 content.getElementsByTagName('a')[0].addEventListener( |
72 'click', this.onDownloadData_.bind(this)); | 80 'click', this.onDownloadData_.bind(this)); |
73 content.getElementsByTagName('input')[0].addEventListener( | 81 content.getElementsByTagName('input')[0].addEventListener( |
74 'click', this.onAudioDebugRecordingsChanged_.bind(this)); | 82 'click', this.onAudioDebugRecordingsChanged_.bind(this)); |
75 content.getElementsByTagName('input')[1].addEventListener( | 83 content.getElementsByTagName('input')[1].addEventListener( |
76 'click', this.onEventLogRecordingsChanged_.bind(this)); | 84 'click', this.onEventLogRecordingsChanged_.bind(this)); |
77 } | 85 } |
78 | 86 |
79 DumpCreator.prototype = { | 87 DumpCreator.prototype = { |
80 // Mark the diagnostic audio recording checkbox checked. | 88 // Mark the diagnostic audio recording checkbox checked. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 var enabled = this.root_.getElementsByTagName('input')[1].checked; | 149 var enabled = this.root_.getElementsByTagName('input')[1].checked; |
142 if (enabled) { | 150 if (enabled) { |
143 chrome.send('enableEventLogRecordings'); | 151 chrome.send('enableEventLogRecordings'); |
144 } else { | 152 } else { |
145 chrome.send('disableEventLogRecordings'); | 153 chrome.send('disableEventLogRecordings'); |
146 } | 154 } |
147 }, | 155 }, |
148 }; | 156 }; |
149 return DumpCreator; | 157 return DumpCreator; |
150 })(); | 158 })(); |
OLD | NEW |