You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, guys! I've got a problem. WebRTC.io have API for create connections, but how i can stop all connections and go out from room without restart page?
I have tried do this:
[js]
rtc.closeStreams = function() {
rtc.fire('disconnect stream', rtc._me);
for (id in rtc.peerConnections) {
if (typeof(rtc.peerConnections[id]) !== 'undefined') {
rtc.peerConnections[id].close();
}
delete rtc.peerConnections[id];
delete rtc.dataChannels[id];
delete rtc.connections[id];
}
};
[/js]
Yea, it closes all inner streams and stop camera, but server didn't sends to all other participants of room "remove peer connection".
How i can close all streams and alert clients that one of them go out from room ( without page restart)?
The text was updated successfully, but these errors were encountered:
Hi, guys! I've got a problem. WebRTC.io have API for create connections, but how i can stop all connections and go out from room without restart page?
I have tried do this:
[js]
rtc.closeStreams = function() {
rtc.fire('disconnect stream', rtc._me);
for (id in rtc.peerConnections) {
if (typeof(rtc.peerConnections[id]) !== 'undefined') {
rtc.peerConnections[id].close();
}
delete rtc.peerConnections[id];
delete rtc.dataChannels[id];
delete rtc.connections[id];
}
};
[/js]
Yea, it closes all inner streams and stop camera, but server didn't sends to all other participants of room "remove peer connection".
How i can close all streams and alert clients that one of them go out from room ( without page restart)?
The text was updated successfully, but these errors were encountered: