pc.getSenders().forEach((sender) => {
sender.transport.iceTransport.addEventListener(
"gatheringstatechange",
(ev) => {
let transport = ev.target;
if (transport.gatheringState === "complete") {
/* this transport has finished gathering candidates,
but others may still be working on it */
}
},
);
});RTCIceTransport: gatheringstatechange event / notebook
RTCIceTransport: gatheringstatechange event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
pc.getSenders().forEach((sender) => {
sender.transport.iceTransport.ongatheringstatechange = (ev) => {
let transport = ev.target;
if (transport.gatheringState === "complete") {
/* this transport has finished gathering candidates,
but others may still be working on it */
}
};
});