Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh network group video calling #49

Open
wants to merge 77 commits into
base: master
Choose a base branch
from

Conversation

aryavohra
Copy link

@aryavohra aryavohra commented May 31, 2020

We've added support for peer-to-peer group video calls for 4 peers, as requested in the linked issue. This is implemented by using multiple RTCPeerConnections per VideoChat client.

The group call actually works, and is done! We are currently just making some small fixes / improvements.

@ianramzy we'd be happy to help load test this and figure out what an appropriate upper bound for group call size should be, although we bet 4 is a good limit.

CSS fixes

  • Assigning each user a random color for use as border around user's video and displaying in chat
  • Scaling for screensharing
  • Video tile wrapping for 3, 4, 5 peers
  • Adjust video tile size for 2 peer calls
  • Wrapping tiles for mobile

Logic fixes

  • Mute mic
  • Fix picture-in-picture
  • Experiment with downscaling stream quality with 4/5 peers
  • Distinguish between network disconnects and peer leaving room
  • Disabling local video stops peers from connecting
  • Fix peer joining when screensharing
  • Add check so that it doesn't crash if you send a message when someone is joining

Testing

  • Check for random refreshes
  • Load testing

By:
@taixhi @khushjammu @aryavohra

taixhi and others added 30 commits May 29, 2020 00:21
…accessed over https, but not two people from different IPs
Fixed UI for 2, 3, 4 peer call + chat.js cleanup
@khushjammu
Copy link

Thanks Ian, we appreciate it! We've added a few changes

  • Stability has been improved. We tested calling a friend in the Philippines who doesn't have great wifi — it reestablishes the peerconnection smoothly. Achieved by making more intelligent use of the signalling server; for example, we use the signalling server to indicate whether a peer disconnection is intermittent (i.e. will be restored momentarily) or permanent. More generally, you shouldn't see any random failures like there used to be.
  • Colors are working great. @aryavohra created a neat algorithm to deterministically calculate what each peer's color should be using just their UUID. This means all the color handling is handled on the frontend, and its consistent across peers.
  • Peer joining during screensharing works great now. It used to crash or not have audio previously, but that's been fixed now.

The big one left is CSS. After that, we should be ready for more rigorous testing, and eventually merging it! Downscaling hurt stability, but we'll take a look at adding it back in.

BTW, we'll try coming up with a checklist and sharing that when it's done too.

@ianramzy
Copy link
Owner

ianramzy commented Jun 6, 2020

Just tested it out with a group of 4 and while I could see everyone in the call, none of the other participants were able to see each person. I think the connecting stability still needs some refinement, perhaps it was because we all joined at the same time. Also downscaling is really needed for calls of more than two.

@Chaphasilor
Copy link
Collaborator

I thought downscaling to 360p was already enabled? @ianramzy are you talking about lowering it even more?

@ianramzy
Copy link
Owner

ianramzy commented Jun 6, 2020

I thought downscaling to 360p was already enabled? @ianramzy are you talking about lowering it even more?

It was disabled for now I believe.

@khushjammu
Copy link

We're not sure how to replicate the issue. We tested it with five people on separate devices across networks and it worked fine. Could you please give more details?

It might be worth looking at deployment. We used Heroku to deploy @ meet.questo.ai — feel free to test it out with that and see if the issue persists.

@Chaphasilor
Copy link
Collaborator

@ianramzy how about we deploy this as a 'beta' feature, with some sort of disclaimer? I know you're not going to like the idea, but given that this is a feature that is hard to test and requires a lot of testing in general, we could add in some kind of feedback option? A simple star rating after the call ends, or a link to a short survey?

@aryavohra
Copy link
Author

By the way, we'd be happy to schedule a call or something so we can hammer out the last few fixes and integration together :)

@aryavohra aryavohra marked this pull request as ready for review June 24, 2020 03:16
@Chaphasilor
Copy link
Collaborator

I think @ianramzy is pretty busy as always, but I'd also be down for a 'proof of concept' group call!

@Chaphasilor Chaphasilor mentioned this pull request Jul 4, 2020
@Chaphasilor
Copy link
Collaborator

I'd say if @ianramzy doesn't respond soon, you should probably just customize your fork and offer it as an alternative to this project :)

I'd hate to see your work be in vain :/

@taixhi
Copy link

taixhi commented Oct 7, 2020

yeah it is a shame.. that's probably what we'll do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants