Multiple Call Connections

979 views
Skip to first unread message

Dave Nguyen

unread,
Oct 20, 2013, 1:58:54 AM10/20/13
to pee...@googlegroups.com
Is it possible to answer multiple call/MediaStream connections? If so, is there some example code of this?

I have 3 peers connect to each other. The first peer starts his video, the other two can see the video. The second peer starts her video, and the first and second peer can see each other's video. However, with the third peer, the first peer's video is lost and only the second peer's video is shown. Just trying to figure out if this is a limitation of PeerJS or my programming! Thanks!

Dave

Michelle Bu

unread,
Oct 20, 2013, 2:10:42 AM10/20/13
to Dave Nguyen, peerjs
Hi Dave,

Have some code we can check out? :)

We'll try to reproduce this, but it's easier if we're able to
reference your code.



Michelle

Dave Nguyen

unread,
Oct 20, 2013, 3:00:34 AM10/20/13
to Michelle Bu, peerjs
Thank you. Let me clean it up so it makes sense first...

Dave Nguyen

unread,
Oct 20, 2013, 5:14:57 AM10/20/13
to pee...@googlegroups.com, Michelle Bu, da...@inthenight.net
Here's some code: http://pastebin.com/YPbirv8P

I tested with having 3 windows open. Second and Third peers calling the first peer. First peer sees both videos fine.

I then tested with the first peer calling the second peer. Second peer sees the video fine. Once the first peer calls the third peer, the third peer can see the first peer's video. However, the second peer loses the connection to the video. Does this mean only one .call can be created?

Dave

Michelle Bu

unread,
Nov 10, 2013, 1:14:30 AM11/10/13
to Dave Nguyen, peerjs
Hey Dave,

Sorry for the late response--looking into this sometime tomorrow. I'll
be tracking the bug at https://github.com/peers/peerjs/issues/104, so
please add any additional details there! :)
Michelle

Michelle Bu

unread,
Nov 10, 2013, 2:36:07 AM11/10/13
to Dave Nguyen, peerjs
Hey Dave,

I just tried your code, and it seems like in lines 70-73 you hang up
on existing calls when you receive a new call--I removed those lines
and having all three clients see all three streams seems to work fine.

Hope this helps!
Michelle
Reply all
Reply to author
Forward
0 new messages