muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.56k stars 1.38k forks source link

Signaling by hand? #308

Open TheOddler opened 7 years ago

TheOddler commented 7 years ago

I was wondering if RTCMultiConnection allows signaling by hand? By this I mean, is it possible to get the initial signaling offer and answer as some text, and let the user copy/paste it to the other side?

Similar to the simple-peer example (under "usage"). When starting the page as the initiator, you get the offer as a string. You then copy it to the page of the answerer. He submits it, and gets an signaling answer string. This is then copies to the initiator, and voila, a WebRTC connection is established.

Is this possible with RTCMultiConnection? And if so, how?

muaz-khan commented 7 years ago

I DON'T think if it is possible. Maybe Chrome/Firefox guys made a trick recently?

The gap between ICE_Connectivity check and DTSL-handshake is very small. One must exchange media descriptions in shortest possible interval; otherwise handshake will fail.

Did you successfully connect two different devices by copying/pasting the SDP-descriptions? If yes, then one can use Email or Facebook or twitter for Signaling as well.

TheOddler commented 7 years ago

I followed the example in simple-peer, and succesfully connected two browser tabs by simple copy/pasting the text. I also succesfully connected two computers (mine and by brother's) on our home network. I didn't try it over the internet.

I was mainly interested in it as a backup, for when no internet is available. So it would be possible to setup a game by creating a lan between two computers without the need for a server app.