muaz-khan / WebRTC-Experiment

WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
https://www.webrtc-experiment.com/
MIT License
11.76k stars 3.94k forks source link

Closing a WebRTC communication #89

Open joydragon opened 11 years ago

joydragon commented 11 years ago

I don't really understand how this communication goes, can you clarify a little bit how this goes? I'm using your RTCMultiConnection with the signaling on node.js with socket.io, I start by creating an object of that RTCMultiConnection called "connection" and specifying some stuff like:

All of that should be fairly common. Then I connect that object to the signaling event on the server with: connection.connect(something) Here so far I have just 1 browser doing this and so far so good. Then I open the connection by doing: connection.open(something) // using the same something as the connect method Now if I want to close the connection object (still with just 1 browser and nobody else connected to this particular WebRTC connection) I assume that the correct way to do this would be with either the close or the leave methods, but:

My question is, is there a way to effectively close the whole thing? Is there a way to close the whole connection and then start another one cleanly without losing that userid, and without having to create again the same object?

Thanks!

Joy Dragon unki no ryoushi

muaz-khan commented 11 years ago

Fixed in latest commits. Documentation / Demo and source code.

Use either autoCloseEntireSession or close.

joydragon commented 11 years ago

Sorry for not replying before but now I can' make it work now with v1.4, did you just remove the versions 1.5 and above because of lack of compatibility? I know that you said before that v1.4 is the only stable one but I guess now you changed a bit of the inner workings The demo https://www.webrtc-experiment.com/RTCMultiConnection-v1.4-Demos/Video-Conferencing.html doesn't work for me, is it because of that change? Cheers!!

muaz-khan commented 11 years ago

It was websocket server issue; which was (unexpectedly) down. Just started it again.

Do you know a mechanism to be email alerted if a node.js/websockets server gets down?

I'm using WebSockets over Node.js.