video call with WebRTC and Flutter

Overview

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/

You might also like...

A view for video based on video_player and provides many basic functions.

flutter_video_view A view for video based on video_player and provides many basic functions. Getting Started This project is a starting point for a Fl

Dec 9, 2022

Flutter plugin for use Video.js in flutter web

Flutter plugin for use Video.js in flutter web

Flutter Video.js player Flutter plugin for use Video.js in flutter web Installation Add it to your package's pubspec.yaml file dependencies: video_j

Oct 17, 2022

The video player for Flutter with a heart of gold

chewie The video player for Flutter with a heart of gold. The video_player plugin provides low-level access to video playback. Chewie uses the video_p

Jan 7, 2023

Flutter video trimmer package

Flutter video trimmer package

A Flutter package for trimming videos Features Customizable video trimmer Video playback control Retrieving and storing video file Also, supports conv

Jan 3, 2023

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Jan 2, 2023

A fully-functional video streaming app made in Flutter using Custom Nodejs backend.

A fully-functional video streaming app  made in Flutter using Custom Nodejs backend.

LAVENDER 📺 A fully-functional video streaming app like netflix made in Flutter using Custom Nodejs backend. How To Run This Project 🏃‍♂️ Clone the r

Jan 10, 2023

Fleo - A video calling application developed using flutter🤠

Fleo - A video calling application developed using flutter🤠

Fleo 📸 Video Calling Application developed using flutter Light and Dark Modes 👁 Join using Room Codes 👽 One room can accomodate upto 4 persons Powe

Dec 25, 2022

Base on Vap to play alpha video animation

Base on Vap to play alpha video animation

Backdrop Transparent video animation is currently one of the more popular implementations of animation. Major manufacturers have also open source

Dec 27, 2022

A cloudinatry video url sample project

cloudinary_media_sample A new Flutter project for Cloudinary video url. Getting Started This project is a starting point for a Flutter application. A

Nov 4, 2021
Owner
Dao Hong Vinh
I am a Mobile App Developer
Dao Hong Vinh
Sandbox video call application using Flutter and WebRTC

Video Call Flutter App ?? Description: This is sandbox video call application using Flutter and WebRTC, you can call from browser to browser, phone to

Dao Hong Vinh 21 Nov 9, 2022
YoYo Video Player is a HLS(.m3u8) video player for flutter.

YoYo Video Player YoYo Video Player is a HLS(.m3u8) video player for flutter. The video_player is a video player that allows you to select HLS video s

Ko Htut 89 Dec 23, 2022
WebRTC plugin for Flutter Mobile/Desktop/Web

Flutter-WebRTC WebRTC plugin for Flutter Mobile/Desktop/Web Sponsored with ?? by Enterprise Grade APIs for Feeds & Chat. Try the Flutter Chat tutorial

Flutter WebRTC 3.4k Jan 8, 2023
Demo for flutter-webrtc

flutter-webrtc-demo Flutter WebRTC plugin Demo Online Demo: https://demo.cloudwebrtc.com:8086/ Usage git clone https://github.com/cloudwebrtc/flutter-

Flutter WebRTC 977 Dec 30, 2022
Simple peer-to-peer with WebRTC for Dart. PeerJS port for Flutter.

PeerDart: Simple peer-to-peer with WebRTC PeerDart provides a complete, configurable, and easy-to-use peer-to-peer API built on top of WebRTC, support

Muhammed Kaplan 42 Jan 8, 2023
A simple audio room using WebRTC P2P mesh network.

P2P Audio Room A simple audio room using peer to peer technology with WebRTC mesh network. Download the app from here Here I have used:- flutter_webrt

Krishnendu Bera 9 Oct 28, 2022
Official Flutter SDK for LiveKit. Easily add real-time video and audio to your Flutter apps.

LiveKit Flutter SDK Official Flutter SDK for LiveKit. Easily add real-time video and audio to your Flutter apps. This package is published to pub.dev

LiveKit 116 Dec 14, 2022
Open source geo based video sharing social app created with Flutter, Supabase and lots of love 💙💙💙

Spot Take a virtual journey around the world with Spot. Spot is a geo-tagged video sharing app, meaning every video recorded in Spot is saved on a loc

Tyler 283 Jan 3, 2023
Advanced video player based on video_player and Chewie for flutter

Better Player Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run. Introduction This plugi

Ahmed Mahmoud 1 Dec 22, 2021
This is a flutter package of video player. it's a very simple and easy to use.

This is a flutter package of video player. it's a very simple and easy to use.

初冬 184 Nov 18, 2022