function getCurrentCandidatePair(statsResults) {
statsResults.forEach((report) => {
if (report.type === "transport") {
currentPair = statsResults.get(report.selectedCandidatePairId);
}
});
if (!currentPair) {
statsResults.forEach((report) => {
if (report.type === "candidate-pair" && report.selected) {
currentPair = report;
}
});
}
return currentPair;
}RTCIceCandidatePairStats: selected property / notebook
RTCIceCandidatePairStats: selected property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.