Check if ice-connection statuses for all connected users
connection.onPeerStateChanged = function(state) { if (state.iceConnectionState.search(/closed|failed/gi) !== -1) { console.error('Peer connection is closed between you & ', state.userid, state.extra, 'state:', state.iceConnectionState); } };
Here is a demo that is using this API: demos/getStats.html