diff options
author | ivoc <ivoc@chromium.org> | 2015-12-18 15:17:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 23:17:58 +0000 |
commit | add54f0d61af48b8b4192b9c97015ce835fa6f2e (patch) | |
tree | 24c2b2eee0d293447e38ef52ca49eaf751ed0100 /content/browser/resources | |
parent | f19cde7acc255f91f8fbe14166b5a45a45a25d6f (diff) | |
download | chromium_src-add54f0d61af48b8b4192b9c97015ce835fa6f2e.zip chromium_src-add54f0d61af48b8b4192b9c97015ce835fa6f2e.tar.gz chromium_src-add54f0d61af48b8b4192b9c97015ce835fa6f2e.tar.bz2 |
Adds a checkbox to chrome://webrtc-internals to log an RTC event log.
RTC event logs store a combination of RTP/RTCP headers and internal WebRTC
events, and can be used for analyzing issues in WebRTC, especially those
related to jitter buffers and bandwidth estimation.
BUG=chromium:545491
TBR=sievers@chromium.org
Review URL: https://codereview.chromium.org/1480593002
Cr-Commit-Position: refs/heads/master@{#366200}
Diffstat (limited to 'content/browser/resources')
-rw-r--r-- | content/browser/resources/media/dump_creator.js | 46 | ||||
-rw-r--r-- | content/browser/resources/media/webrtc_internals.js | 8 |
2 files changed, 52 insertions, 2 deletions
diff --git a/content/browser/resources/media/dump_creator.js b/content/browser/resources/media/dump_creator.js index 6aca1b6..7507649 100644 --- a/content/browser/resources/media/dump_creator.js +++ b/content/browser/resources/media/dump_creator.js @@ -52,12 +52,30 @@ var DumpCreator = (function() { ' enabled using the same base filename, the files will be appended' + ' to and may become invalid. It is recommended to choose a new base' + ' filename each time or move the produced files before enabling' + - ' again.</p>'; - + ' again.</p>' + + '<p><label><input type=checkbox>' + + 'Enable diagnostic packet and event recording</label></p>' + + '<p class=audio-recordings-info>A diagnostic packet and event' + + ' recording can be used for analyzing various issues related to' + + ' thread starvation, jitter buffers or bandwidth estimation. Two' + + ' types of data are logged. First, incoming and outgoing RTP headers' + + ' and RTCP packets are logged. These do not include any audio or' + + ' video information, nor any other types of personally identifiable' + + ' information (so no IP addresses or URLs). Checking this box will' + + ' enable the recording for ongoing WebRTC calls and for future' + + ' WebRTC calls. When the box is unchecked or this page is closed,' + + ' all ongoing recordings will be stopped and this recording' + + ' functionality will be disabled for future WebRTC calls. Recording' + + ' in multiple tabs or multiple recordings in the same tab is' + + ' currently not supported. When enabling, a filename for the' + + ' recording can be selected. If an existing file is selected, it' + + ' will be overwritten. </p>'; content.getElementsByTagName('a')[0].addEventListener( 'click', this.onDownloadData_.bind(this)); content.getElementsByTagName('input')[0].addEventListener( 'click', this.onAudioDebugRecordingsChanged_.bind(this)); + content.getElementsByTagName('input')[1].addEventListener( + 'click', this.onEventLogRecordingsChanged_.bind(this)); } DumpCreator.prototype = { @@ -71,6 +89,16 @@ var DumpCreator = (function() { this.root_.getElementsByTagName('input')[0].checked = false; }, + // Mark the event log recording checkbox checked. + enableEventLogRecordings: function() { + this.root_.getElementsByTagName('input')[1].checked = true; + }, + + // Mark the event log recording checkbox unchecked. + disableEventLogRecordings: function() { + this.root_.getElementsByTagName('input')[1].checked = false; + }, + /** * Downloads the PeerConnection updates and stats data as a file. * @@ -105,6 +133,20 @@ var DumpCreator = (function() { chrome.send('disableAudioDebugRecordings'); } }, + + /** + * Handles the event of toggling the event log recordings state. + * + * @private + */ + onEventLogRecordingsChanged_: function() { + var enabled = this.root_.getElementsByTagName('input')[1].checked; + if (enabled) { + chrome.send('enableEventLogRecordings'); + } else { + chrome.send('disableEventLogRecordings'); + } + }, }; return DumpCreator; })(); diff --git a/content/browser/resources/media/webrtc_internals.js b/content/browser/resources/media/webrtc_internals.js index 5b3bb0d..5ccdf39 100644 --- a/content/browser/resources/media/webrtc_internals.js +++ b/content/browser/resources/media/webrtc_internals.js @@ -332,6 +332,14 @@ function audioDebugRecordingsFileSelectionCancelled() { /** + * Notification that the event log recordings file selection dialog was + * cancelled, i.e. recordings have not been enabled. + */ +function eventLogRecordingsFileSelectionCancelled() { + dumpCreator.disableEventLogRecordings(); +} + +/** * Set */ function enableAudioDebugRecordings() { |