Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter + webrtc room video call

Tags:

flutter

webrtc

Im find https://github.com/cloudwebrtc/flutter-webrtc for use webrtc in flutter. But in repository, the sample is only peer to peer with 2 devices. I have build app for my customer for video call with many people. It's possible use this package for build video conference (2+) in flutter?

like image 779
Thiago Freitas Avatar asked Nov 26 '22 20:11

Thiago Freitas


1 Answers

Yes, you should be able to establish a video call with many people using WebRTC and this package.

One approach would be to create a new RTCPeerConnection for every new peer in your room. Check out this example, it does exactly that.

However, since WebRTC is intended for peer-to-peer, this solution is not scalable at all, because you are going to be creating new peer connections exponentially. With ~6 people, the quality of your call will already be terrible. If your intention is to have a conference room, you should really look into using a Selective Forwarding Unit (SFU), if you plan to be scalable at all.

Checkout Janus VideoRoom plugin for an open-source SFU implementation, just be aware that it's a bit cumbersome to set it up.

like image 86
lnogueir Avatar answered Feb 15 '23 19:02

lnogueir