Multiple streams on the same peer(media) connection?
In some situation, maybe we need to send screen and video/audio at the same time, for example, https://github.com/muaz-khan/WebRTC-Experiment/blob/8d76c0cb5be4d8df17c6603220c091b8ea2ff0f6/demos/screen-and-video-from-single-peer.html Using native api, we can add multiple streams to same peerconnection like pc.addStream(video_stream); pc,addStream(screen_stream); After that, we could received both stream at other side. But in peerjs now, we can only set one stream in a single media connection. So i tried to call the other side twice with the different stream, set the different metadata, and it works, but if some one send one call to the other side, but the other one want to send both the video and screen, he/she need to create a new peer connection with the old one, which makes the system complex. I hope you could enhance this to support multi streams on the same media connection. Thanks a lot! You are doing a great job on this!
Similar to #82 :). We're looking to add the ability to essentially call 'addStream' like you could natively.
Thanks for the suggestion--we'll definitely get around to it.
Great to hear that :D
FF doesn't support renegociation (https://hacks.mozilla.org/2013/09/webrtc-update-and-workarounds/) : you have to provide all the streams before making your offer. Even with chrome, the renegocation is tricky. I think that providing an addStream method will be confusing if we can't call it anytime. Is it possible to make call('id',streams) accept a stream or an array of streams ?
(Ah, of course, the browser issues.)
Yeah, that's a good idea. I'll test that out.
I experimented with this tonight, and am getting a failed offer in Chrome: SetLocalDescription failed: Failed to push down offer transport description..
I'll make a PR for what I do have, but probably won't get around to investigating this issue soon.