Bug 1339906 - pt 2 - add bytes sent and received to about:webrtc page. r=drno, r=qDot
MozReview-Commit-ID: 7KS1aXNZPle
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -656,23 +656,26 @@ ICEStats.prototype = {
let tbody = [];
for (let stat of this.generateICEStats()) {
tbody.push([
stat.localcandidate || "",
stat.remotecandidate || "",
stat.state || "",
stat.priority || "",
stat.nominated || "",
- stat.selected || ""
+ stat.selected || "",
+ stat.bytesSent || "",
+ stat.bytesReceived || ""
]);
}
let statsTable = new SimpleTable(
[getString("local_candidate"), getString("remote_candidate"), getString("ice_state"),
- getString("priority"), getString("nominated"), getString("selected")],
+ getString("priority"), getString("nominated"), getString("selected"),
+ getString("ice_pair_bytes_sent"), getString("ice_pair_bytes_received")],
tbody);
let div = document.createElement("div");
let heading = document.createElement("h4");
heading.textContent = getString("ice_stats_heading");
div.appendChild(heading);
@@ -720,17 +723,19 @@ ICEStats.prototype = {
let remote = candidates.get(pair.remoteCandidateId);
if (local) {
stat = {
localcandidate: this.candidateToString(local),
state: pair.state,
priority: pair.priority,
nominated: pair.nominated,
- selected: pair.selected
+ selected: pair.selected,
+ bytesSent: pair.bytesSent,
+ bytesReceived: pair.bytesReceived
};
matched[local.id] = true;
if (remote) {
stat.remotecandidate = this.candidateToString(remote);
matched[remote.id] = true;
}
stats.push(stat);
--- a/toolkit/locales/en-US/chrome/global/aboutWebrtc.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutWebrtc.properties
@@ -57,16 +57,18 @@ rtp_stats_heading = RTP Stats
# LOCALIZATION NOTE (ice_state, ice_stats_heading): "ICE" is an abbreviation
# for Interactive Connectivity Establishment, which is an IETF protocol,
# and should not normally be translated. "Stats" is an abbreviation for
# Statistics.
ice_state = ICE State
ice_stats_heading = ICE Stats
ice_restart_count_label = ICE restarts
ice_rollback_count_label = ICE rollbacks
+ice_pair_bytes_sent = Bytes sent
+ice_pair_bytes_received = Bytes received
# LOCALIZATION NOTE (av_sync_label): "A/V" stands for Audio/Video.
# "sync" is an abbreviation for sychronization. This is used as
# a data label.
av_sync_label = A/V sync
# LOCALIZATION NOTE (jitter_buffer_delay_label): A jitter buffer is an
# element in the processing chain, see http://wikipedia.org/wiki/Jitter