Skip to content

Commit 87bbf21

Browse files
authored
Merge pull request #1581 from fippo/slim-trickle
trickle-ice: trim information about candidates
2 parents 7d3a6b3 + 0f6d4b8 commit 87bbf21

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

src/content/peerconnection/trickle-ice/css/main.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,3 @@ th:nth-child(6),td:nth-child(6) {
6969
#error-note {
7070
display: none;
7171
}
72-
73-
div#container {
74-
max-width: 90em;
75-
}

src/content/peerconnection/trickle-ice/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,14 @@ <h2>ICE options</h2>
118118
<thead id="candidatesHead">
119119
<tr>
120120
<th>Time</th>
121-
<th>Component</th>
122121
<th>Type</th>
123122
<th>Foundation</th>
124123
<th>Protocol</th>
125124
<th>Address</th>
126125
<th>Port</th>
127126
<th>Priority</th>
128-
<th>relayProtocol (if present)</th>
129-
<th>Mid</th>
130-
<th>MLine Index</th>
131-
<th>Username Fragment</th>
132127
<th>URL (if present)</th>
128+
<th>relayProtocol (if present)</th>
133129
</tr>
134130
</thead>
135131
<tbody id="candidatesBody"></tbody>

src/content/peerconnection/trickle-ice/js/main.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,9 @@ function formatPriority(priority) {
182182
].join(' | ');
183183
}
184184

185-
function appendCell(row, val, span) {
185+
function appendCell(row, val) {
186186
const cell = document.createElement('td');
187187
cell.textContent = val;
188-
if (span) {
189-
cell.setAttribute('colspan', span);
190-
}
191188
row.appendChild(cell);
192189
}
193190

@@ -232,11 +229,11 @@ function getFinalResult() {
232229
async function iceCallback(event) {
233230
const elapsed = ((window.performance.now() - begin) / 1000).toFixed(3);
234231
const row = document.createElement('tr');
235-
appendCell(row, elapsed);
236232
if (event.candidate) {
237233
if (event.candidate.candidate === '') {
238234
return;
239235
}
236+
appendCell(row, elapsed);
240237
const {candidate} = event;
241238
let url;
242239
// Until url is available from the candidate, to to polyfill.
@@ -251,18 +248,14 @@ async function iceCallback(event) {
251248
});
252249
}
253250

254-
appendCell(row, candidate.component);
255251
appendCell(row, candidate.type);
256252
appendCell(row, candidate.foundation);
257253
appendCell(row, candidate.protocol);
258254
appendCell(row, candidate.address);
259255
appendCell(row, candidate.port);
260256
appendCell(row, formatPriority(candidate.priority));
261-
appendCell(row, candidate.relayProtocol || '');
262-
appendCell(row, candidate.sdpMid);
263-
appendCell(row, candidate.sdpMLineIndex);
264-
appendCell(row, candidate.usernameFragment);
265257
appendCell(row, candidate.url || url || '');
258+
appendCell(row, candidate.relayProtocol || '');
266259
candidates.push(candidate);
267260
}
268261
candidateTBody.appendChild(row);
@@ -275,7 +268,7 @@ function gatheringStateChange() {
275268
const elapsed = ((window.performance.now() - begin) / 1000).toFixed(3);
276269
const row = document.createElement('tr');
277270
appendCell(row, elapsed);
278-
appendCell(row, getFinalResult(), 7);
271+
appendCell(row, getFinalResult());
279272
pc.close();
280273
pc = null;
281274
if (stream) {

0 commit comments

Comments
 (0)