Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

video call flutter app ��

description:

  • this is sandbox video call application using flutter and webrtc, you can call from browser to browser, phone to phone, browser to phone and opposite.

how does it work?

  • �� client 1 and client 2 create peer connection by request create to server stun (url stun server: stun:stun.l.google.com:19302)

  • client 1 request server stun create offer
  • server stun will response sdp text and type is “offer” to client 1
  • client 1 need copy sdp text, type and send to client 2 then ** client 2** set peer connection remote to sdp of client 1
  • client 2 create answer for client 1
  • server stun will response sdp text,type(is “answer”) and candidate string to client 2
  • client 2 need copy above responses and send to client 1
  • client 1 set peer connection remote to sdp of client 2 and add candidate of client 2
  • okay, client 1 and 2 connected…

multiple peers possible?

  • i found 3 ways for do it!

�� option 1: mesh model

  • it looks similar to webrtc basic p2p, with this model if there are 6 or more users the performance will be very bad.

�� option 2: mcus – multipoint control units

  • mcus are also referred to as multipoint conferencing units. whichever way you spell it out, the basic functionality is shown in the following diagram.
  • each peer in the group call establishes a connection with the mcu server to send up its video and audio. the mcu, in turn, makes a composite video and audio stream containing all of the video/audio from each of the peers, and sends that back to everyone.
  • regardless of the number of participants in the call, the mcu makes sure that each participant gets only one set of video and audio. this means the participants’ computers don’t have to do nearly as much work. the tradeoff is that the mcu is now doing that same work. so, as your calls and applications grow, you will need bigger servers in an mcu-based architecture than an sfu-based architecture. but, your participants can access the streams reliably and you won’t bog down their devices.
  • media servers that implement mcu architectures include kurento (which twilio video is based on), frozen mountain, and freeswitch.

�� option 3: sfus – selective forwarding units

  • in this case, each participant still sends just one set of video and audio up to the sfu, like our mcu. however, the sfu doesn’t make any composite streams. rather, it sends a different stream down for each user. in this example, 4 streams are received by each participant, since there are 5 people in the call.
  • the good thing about this is it’s still less work on each participant than a mesh peer-to-peer model. this is because each participant is only establishing one connection (to the sfu) instead of to all other participants to upload their own video/audio. but, it can be more bandwidth intensive than the mcu because the participants each receive multiple streams downloaded.
  • the nice thing for participants about receiving separate streams is that they can do whatever they want with them. they are not bound to layout or ui decisions of the mcu. if you have been in a conference call where the conferencing tool allowed you to choose a different layout (ie, which speaker’s video will be most prominent, or how you want to arrange the videos on the screen), then that was using an sfu.
  • media servers which implement an sfu architecture include jitsi and janus.

reference link: https://webrtc.ventures/2020/12/webrtc-media-servers-sfus-vs-mcus/


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.