simplewebrtc / SimpleWebRTC

Simplest WebRTC ever
Other
4.65k stars 1.19k forks source link

Double datachannel using cordova-iosrtc plugin #406

Open csturiale opened 8 years ago

csturiale commented 8 years ago

Hi, I noticed a bug using combination of cordova-iosrtc plugin and simplewebrtc.The problem is that joining a room I obtain 2 datachannels open."simplewebrtc" and "roomName". Looking at the code and comments the problem is solved by passing roomName in peer.start . Looking at your comments: // well, the webrtc api requires that we either // a) create a datachannel a priori // b) do a renegotiation later to add the SCTP m-line // Let's do (a) first...

I suppose there is a renegotiation problem.

I propose to implements this feature to create data channel room directly. If you prefer I can make a pull request. Thanks

tgabi333 commented 8 years ago

@csturiale pull requests are always welcomed :)