Realtime Communication with WebRTC in Flutter & Dart

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 148

  • @raghav042
    @raghav042 Год назад +11

    after 2 years, still one of the simplest, rare and useful video on flutter webrtc with firestore

    • @manggamusasuleiman
      @manggamusasuleiman 3 месяца назад

      3 years later I can't follow it because majority is deprecated or no longer in use

  • @mamuch7665
    @mamuch7665 3 года назад +28

    Please do make sure this isn't just a one-off video but a series on WebRTC and Flutter. That would really be a treat. continue doing the excellent work. bless!

    • @FlutterExplained
      @FlutterExplained  3 года назад +6

      I hope that the Documentation gets added on that end then maybe this is a great Live Streaming topic :)

    • @yourcompany6708
      @yourcompany6708 2 года назад +1

      @@FlutterExplained not working on web (chrome)......only working on phones

  • @ravikovind
    @ravikovind 3 года назад +9

    Please create full series on Flutter WebRTC and explain every single point. you are doing excellent work, sir. thanks for the video.

  • @touqeer2728
    @touqeer2728 Год назад +3

    Best practical implementation on webrtc with flutter.
    Really helpful for me. God bless you.

  • @The12nit
    @The12nit 3 года назад +2

    AMAZING I couldn't understand the flutter webRTC plugin my self and you help me understand it, thank you!!!!

  • @hawkybae
    @hawkybae 3 года назад +7

    I would love a tutorial on Graphql and Flutter in this format, learned a lot! Thank you. :)

  • @shubhamtariyal439
    @shubhamtariyal439 2 года назад +3

    If you don't hear audio, make sure to set audio to true in openUserMedia function

  • @cherriepie
    @cherriepie 3 года назад +2

    18:58 I don't understand the ICE candidates, why are there so many of them there?

    • @FlutterExplained
      @FlutterExplained  3 года назад +1

      Hi Cherrie, the ICE candidates are every possible connections that both clients can have should one fail the Webrtc will immediately try to connect via another ICE that’s why there are some more. I hope that helps 😊 feel free to read the Mozilla mdn documentation to that topic.

  • @AioriaPoderoso
    @AioriaPoderoso 3 года назад

    I need more of this, webRTC is a great topic

  • @Jo-tb6ur
    @Jo-tb6ur 3 года назад

    Awesome video. You havr been recording since and your videos have helped a lot. Thank you

    • @FlutterExplained
      @FlutterExplained  3 года назад

      You are most welcome Jo. It is always a joy if someone gets the help he searches :)

  • @pierrecourtois5167
    @pierrecourtois5167 2 года назад +7

    There's a small bug in the github where the roomId is never updated when creating a room. A quick fix consist in removing the var at the line 58 of signaling.dart and converting roomId from a String? to a regular String before returning it. It fixes another problem that I was having where the rooms were never deleted even after everyone left them, because the condition check on the roomId not being null was always false (in hangup function, line 208).
    Hope that helps anyone with that problem

  • @marodonthemorone
    @marodonthemorone 3 года назад +1

    thanks for explaining, really helpful!

  • @prashantmaharana3467
    @prashantmaharana3467 3 года назад +1

    Thankyou for the tutorial

  • @rupamkarmakar7266
    @rupamkarmakar7266 3 года назад +2

    Please make more videos on Flutter WebRTC

  • @sanmeetsingh4538
    @sanmeetsingh4538 2 года назад +1

    Awesome explanation ☺️ !

  • @techwiththomas5690
    @techwiththomas5690 2 года назад +2

    Hey, first of all thanks for the tutorial. I created my own App using my own websocket and coturn server. After days I realized (confirmed by your showcase), that the video call only works flawlessly when one FIRST activates the webcames on each side BEFORE creating/joining the room. How would I get around that so the user could open and close the webcam WHENEVER he wants to?

  • @harshmirdhwal
    @harshmirdhwal 3 года назад +1

    This video is a gem

  • @nayantala
    @nayantala 3 года назад +3

    Please Do explain it thoroughly, I have used it with flutter, I do have few questions about it.

  • @michereff16
    @michereff16 Год назад +1

    How to use this without Firebase?

    • @FlutterExplained
      @FlutterExplained  Год назад +1

      If you do not want to use firebase you can do it with nearly every Real time DB provider such as Supabase etc.
      If you would like to create your own Server or want to host it yourself it getting tricky, you will need a Signiling server as explained here: antmedia.io/webrtc-signaling-servers-everything-you-need-to-know/

    • @michereff16
      @michereff16 Год назад +1

      @@FlutterExplained Thank you very much for replying! This webRTC stuff is the most complicated stuff I had to deal with so far haha. I'm currently learning dart/flutter and I wasn't able to figure it out how to actually use this package.

    • @FlutterExplained
      @FlutterExplained  Год назад +1

      Yeah same for me the video took me more than a month. Still working on the next video but could not find the time to invest 🙃

  • @otakuhxhwow4386
    @otakuhxhwow4386 7 дней назад

    i copy all of your code and paste to mine but i cant join room but i download your code i can join it, please help me why

  • @hardikdabhi943
    @hardikdabhi943 3 года назад +2

    Can we create many to many peer connection using core webRTC. or we need to use Framework like Jitsi?

  • @raghav042
    @raghav042 3 года назад +2

    Very helpful video ❤️
    Please make tutorial on flutter pion webrtc also

  • @gourav7315
    @gourav7315 3 года назад +1

    Can I share screen using webrtc, Please make a video bon that

  • @vijayv9074
    @vijayv9074 3 месяца назад

    flutter webrtc its possible to record audio call only?

  • @kamal-xd7id
    @kamal-xd7id 2 года назад +1

    So, is WebRTC only limited to 1:1 communication or 2 max. How about live streaming from one broadcaster to 100s of viewers. Can it not be solved by WebRTC?

    • @FlutterExplained
      @FlutterExplained  2 года назад +1

      Yes it can be solved. Actually most of the video streaming offerings we use work like that (Google Meetup for example) but our example here is just for two participents. I can imagine that the complexity rises quite harsh from 1:1 vs 100 members but it should be solvable.

  • @nagak3300
    @nagak3300 6 месяцев назад

    Thanks for the video. This was very helpful for understanding. For running this code as a web app, Where should I provide my Firestore details ? In Index.html in the firebaseConfig variable ?

  • @MischelCh-u7h
    @MischelCh-u7h 5 месяцев назад

    I always have problem 'Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable'. How fix

  • @muhammedshimaz7208
    @muhammedshimaz7208 5 месяцев назад

    Hi, can you explain how to have a group video call including more than 2 people

  • @TheTahmeed
    @TheTahmeed 2 года назад

    Call does not work on different network. Like one device from broadband and another from mobile data. How to fix it??

  • @13_saurabhjewalikar33
    @13_saurabhjewalikar33 23 дня назад

    hello can u help me pls to integrate viedo call feature i copied your code but i didnt get the firebase setup

  • @kamalpreetsingh7777
    @kamalpreetsingh7777 2 года назад

    great video ! very helpful.
    one question - how to create own stun server?

  • @shubhamtariyal439
    @shubhamtariyal439 2 года назад

    How to implement group video chat? Also I want to show buttons to open/close camera and mic, can you please help me with it?

  • @macelux7202
    @macelux7202 2 года назад

    Excellent work!
    Could you also explain how audio calls work ?

  • @techredefined6708
    @techredefined6708 2 года назад

    Can we also add a feature like whiteboard to this ?

  • @suhailn2508
    @suhailn2508 2 года назад +1

    hi , please make a datachannel video with firebase and webrtc for messaging too, expecting from you , thank you for this great content

  • @garenkarapetian709
    @garenkarapetian709 2 года назад +1

    Which version of Flutter was this written for???? I keep running into a multitude of incompatibility issues after running flutter pub upgrade.

    • @FlutterExplained
      @FlutterExplained  2 года назад

      True, it has been a while, if I find time in the next week I will work a bit on the web rtc project.

  • @deniztb4192
    @deniztb4192 3 года назад +1

    Thank you it was great. is it possible to record or save voice calls on server to have them?

    • @FlutterExplained
      @FlutterExplained  3 года назад

      Yes that should be possible, but I believe you would not need WebRTC for that. WebRTC is mostly for communication between two computers, there are way easier possibilities to record a camera :)

  • @sagorhossain6315
    @sagorhossain6315 Год назад

    excellent explanation..!❤ but here only one user can join..how can i implement the system to join multiple user..?

  • @vishnugudavalli5472
    @vishnugudavalli5472 Год назад

    Give a brief info about webrtc automation using selenium

  • @sripranav
    @sripranav 2 года назад

    how to change camera view front or back, or close completely?

  • @slymanyonga7226
    @slymanyonga7226 2 года назад

    I don't know how to setup the firebase part, can you help,

  • @MuskanChaudhary-yt4ly
    @MuskanChaudhary-yt4ly 9 месяцев назад

    Does this work for group video call? like if i want 5 people to be in the session?

  • @gourav7315
    @gourav7315 3 года назад +1

    Can i make chat web app using webrtc

  • @techknowledgebase4504
    @techknowledgebase4504 3 года назад

    How to play audio stream in background when app not open?

  • @hdcutz2936
    @hdcutz2936 Год назад

    Similarly how to transfer pre-recorded video like this?

  • @gopikrishnan8999
    @gopikrishnan8999 Год назад

    How to set video off on and mic on and off in this code

  • @rajenderkatkuri7642
    @rajenderkatkuri7642 2 года назад

    Hey!! can we share *files* with a similar layout.

  • @minaraouf4120
    @minaraouf4120 Год назад

    Can I do this on mobile, not the web? And what are the steps?

  • @venkatavinaib6017
    @venkatavinaib6017 3 года назад +1

    Hey, I've been trying to implement the same thing which you did, but somehow I'm not getting any ice candidates for the video. Only the audio is working. Am I missing something?

    • @troyuit
      @troyuit 3 года назад

      Same here. When I tested on the ios and android the callee candidate collection were missing video ice candidates. And list of ice candidate in callee collection is always shorter than caller.

  • @shubhammaurya1698
    @shubhammaurya1698 Год назад +1

    more then 2 people Can join meeting

    • @FlutterExplained
      @FlutterExplained  Год назад

      Yes they can but it will be a very big enhancement because you will have to keep track of the different rooms and how to connect them. I was not able to take a look into that but I am sure there are quite some good tutorials out there on how to create it. The easiest way is probably to follow along a web tutorial and convert it to Dart and Flutter.

  • @trongnhannguyenle5941
    @trongnhannguyenle5941 Год назад

    When I call from 2 Android devices to each other, it works fine, but when I call from an iPhone device to an Android device, the error "PlatformException(mediaStream AddTrack: Stream is null, null, null, null)" appears. , can you help me? Thank you very much.

  • @RubyLim-v9g
    @RubyLim-v9g Год назад +1

    Is this working in iOS and Android apps? My RTCPeerConnectionState keeps failing.

    • @FlutterExplained
      @FlutterExplained  Год назад

      Mhhh last time I checked it worked but feel free to crate a GitHub issue and I’ll have a look

  • @hopetechnologie2969
    @hopetechnologie2969 Год назад

    hello, good work, can this work on mobile version of flutter ? Or just in web browser

  • @yourcompany6708
    @yourcompany6708 2 года назад

    can i use for confrencing with multiple people
    ?????????????????????

  • @ardeshirojan1468
    @ardeshirojan1468 9 месяцев назад

    Fixes: Just set up a firebase project and enable firebase datastore , then go over rules and change "write if false" to "write if true"
    then everything is going to work well enough

  • @shubhamtariyal439
    @shubhamtariyal439 2 года назад +1

    Hi! Can we do video recording, chat, etc? or is it better to use services like Agora? I am confused which one to use(agora or web rtc)

    • @FlutterExplained
      @FlutterExplained  2 года назад

      I believe Agora uses WebRTC under the hood. So Agora is like a layer above to make the usage easier :)

    • @shubhamtariyal439
      @shubhamtariyal439 2 года назад

      @@FlutterExplained can you make a tutorial for video recording using web_rtc?

  • @funnynews341
    @funnynews341 2 года назад

    Can you make videos about xmpp combine with WebRTC for building chat app?

  • @jobflutter4539
    @jobflutter4539 3 года назад

    How I can open app when app is in background or how to implement callkeep

  • @eqatardotcom4520
    @eqatardotcom4520 2 года назад

    Hi I am looking for a help on webrtc

  • @testrentech7802
    @testrentech7802 Год назад

    It's possible to one to many connection like live video streaming using this code?

  • @luckyme6098
    @luckyme6098 2 года назад

    You should have tell about the package name at the beginning.....

  • @tusharranjan2509
    @tusharranjan2509 3 года назад

    Great video! Cleared lot of concept for me.
    So, I implemented it, on Android device. With some ui change I made it work. On the same connection (WiFi), the video stream was rendered for both side. But no Audio.
    But when tested on different connections, nothing happened. Even though firebase was being populated with candidates, offer and answer SDP.

  • @naveenbharadwaj5059
    @naveenbharadwaj5059 3 года назад +1

    is it possible to share screen from one client to another ? like we do in gmeet,zoom

    • @FlutterExplained
      @FlutterExplained  3 года назад +1

      Yes it is, actually it is quite easy you just have to change inside of the openUserMedia the navigator.mediaDevices.getUserMedia to navigator.mediaDevices.getDisplayMedia.
      With that you get asked instead of sharing your webcam to share your monitor from the browser :), I hope that helps.

  • @abdarhmanabuhejleh6548
    @abdarhmanabuhejleh6548 3 года назад

    I want to use Flutter WebRTC with a server so I can record the video call , can you help me ???
    I want to make it global calls not locally , and I am having a trouble with that .
    any hints plz :(

  • @kabal6748
    @kabal6748 2 года назад

    can you PLEASE make a tutorial to use a phone camera as a webcam using webrtc? your tutorials are awesome!

  • @jishnuraj1670
    @jishnuraj1670 2 года назад

    Does this work when the app is exported for Android?

  • @gofullstack
    @gofullstack 3 года назад

    I just don't know why I can't wrap my head around this thing. In my case I need to send the video from one end (client) to the others just like the live feature we've got here.

    • @livesoko
      @livesoko Год назад

      Hola, did you ever figure this out?

  • @Veluwe_Wildcam
    @Veluwe_Wildcam 3 года назад +1

    Hi Max, thanks for your great explanation. How would you implement calling someone? By push notification linked to the room id? How can you trigger call behavior on a mobile device? Any ideas?

    • @FlutterExplained
      @FlutterExplained  3 года назад +2

      I guess you would need to have a room for a specific user and send him a push notification of the callers room so that he can join. The Notification could trigger the default call on the phone.

    • @FlutterExplained
      @FlutterExplained  3 года назад +2

      But to be frank it sounds like you would need to create some native implementations.

  • @lmagentur7705
    @lmagentur7705 2 года назад

    i followed your code and tried to run everything on my ios device. it works perfectly fine. one thing i dont understand actually: if i create a room i get my video camera up and showing. if i just press open cam and mic like you did in the showcase i get an error Not found video track for RTCMediaStream. Do you have any idea what happens here?? Since creating a room gets the stream without any issue

  • @BhupeshRajShakya
    @BhupeshRajShakya 3 года назад +1

    hey can make video on data modal classes Please ??

    • @FlutterExplained
      @FlutterExplained  3 года назад +1

      Sure sounds like a topic a lot of people would be interested. I will add it to my list.

  • @alisampson6639
    @alisampson6639 3 года назад

    Thanks so much Sir.. But I want to ask how you can navigate back from the call screen after one party hangs up just like how every video call app works.

    • @001Debjeet
      @001Debjeet 3 года назад

      make a new screen after the call ends navigate to that screen

  • @marodonthemorone
    @marodonthemorone 3 года назад

    22:45 the best part 😂

  • @ramsmart8939
    @ramsmart8939 3 года назад

    It's a great effort. Keep going ❤️. This example is a one to one or one to many?

    • @FlutterExplained
      @FlutterExplained  3 года назад +1

      The video is about one - to - one communication.

    • @ramsmart8939
      @ramsmart8939 3 года назад

      @@FlutterExplained for one to many just change the _remote renderer into list.

    • @blessingsnthara
      @blessingsnthara 3 года назад

      @@ramsmart8939 were you able to implement this?

    • @naveenbharadwaj5059
      @naveenbharadwaj5059 3 года назад

      @@ramsmart8939 can you be more specific ? I'm trying to scale from 5-10 users in a meeting

  • @kishelectronics
    @kishelectronics 5 месяцев назад

    So I tried to get connected in IOS devices making some extra steps, the thing is it goes live but Im having an issue with connectivity. Maybe it doesnt work becuase it must be actual devices not the emulator, but it's not giving me connection it gets into the room and everything but media is not displayed.

    • @kishelectronics
      @kishelectronics 5 месяцев назад

      Forget it. I solved it, it works clean.

  • @boulbabadobani4597
    @boulbabadobani4597 2 года назад

    Can I use webRTC with mobiles (without browser)?

  • @hashWorld-0
    @hashWorld-0 Месяц назад

    and how to make group call

  • @marwanaladwan4421
    @marwanaladwan4421 2 года назад

    In my case there is a desktop app (not developed using flutter) connected with external camera and the app just displays what the camera records.
    In my flutter app, I want to recieve that video from the desktop app and display it in my flutter app.
    Is that possible using WebRTC?

  • @awaisjamil7047
    @awaisjamil7047 2 года назад

    Hi @Flutter Explained I want to create app where flutter app can communicate with VR(unity) app using webrtc and Flutter app can discover vr headsets and connect to it and start sending and receiving text messages, please guide

  • @romeoangelesjr4414
    @romeoangelesjr4414 3 года назад +1

    Question: Will this only work for P2P connections? Or it could work like MS Teams?

    • @FlutterExplained
      @FlutterExplained  3 года назад +1

      Hi Romeo, it could work like teams. P2P is just how the connection is happening between two peers, one of the peer can be a distribution. As I mentioned you have a "room" that multiple people can connect to. My example is just for one person so far.

  • @dennyraymond7505
    @dennyraymond7505 3 года назад

    hi i have a problem when hang up, the webcam light still on, are you got the same problem too?

    • @dennyraymond7505
      @dennyraymond7505 3 года назад

      fixed it. i accidentally assigned new localstream every time i init a room

  • @shyambihariswami8250
    @shyambihariswami8250 10 месяцев назад

    Helpfull video 🤟

  • @mahmoudabdulfattah7294
    @mahmoudabdulfattah7294 2 года назад

    thank you very much but, kindly I need more details even if paid please.

  • @rajenderkatkuri7642
    @rajenderkatkuri7642 2 года назад

    Hey!! will this work for Android ?

  • @blessingsnthara
    @blessingsnthara 3 года назад

    I am trying to implement a one to many stream flutter app from following your tutorial, i have made a few changes to your code. when one user joins a room to watch other users stream it works perfectly but when a second user tries to also join the room it gives an error (Error: InvalidStateError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable)

    • @abdarhmanabuhejleh6548
      @abdarhmanabuhejleh6548 3 года назад

      can you share the code plz : (

    • @blessingsnthara
      @blessingsnthara 3 года назад

      @@abdarhmanabuhejleh6548 Thank you for your reply. I had to use RTMP protocol because I couldn't find a solution with webrtc. Nice coding!

  • @amjaddaher5032
    @amjaddaher5032 8 месяцев назад

    thanks ..every thing was working good...but suddenly :
    ICE Connection state changed: RTCIceConnectionState.RTCIceConnectionStateChecking
    connection state changed: RTCPeerConnectionState.RTCPeerConnectionStateConnecting
    ICE Connection state changed: RTCIceConnectionState.RTCIceConnectionStateDisconnected
    connection state changed: RTCPeerConnectionState.RTCPeerConnectionStateFailed

    • @MiniStrikeGamer
      @MiniStrikeGamer 2 месяца назад

      Having same issue, did you find out what it was?

  • @mazekaty
    @mazekaty Год назад

    just support dart web ?

  • @Manish-ez8yq
    @Manish-ez8yq Год назад

    very nice demonstration of webRTC, I love it. I face an issue which is when I make the website live and then create room and join from different systems, I cannot get the video connection. But when I tried it on same system it is working. eventually any one will use video calling from independent systems. please anybody could help me in this.

  • @althafaralijaffarali1803
    @althafaralijaffarali1803 3 года назад

    Is it possible to create an enterprise level app using this?. If it so how can we make it hackerproof? Thanks for sharing your knowledge ❤️.

    • @FlutterExplained
      @FlutterExplained  3 года назад

      Yes I guess there are already a lot of companies that use WebRTC. bloggeek.me/massive-applications-using-webrtc/

  • @naveenbharadwaj5059
    @naveenbharadwaj5059 3 года назад

    Can anyone guide me to create mesh topology ? I want to scale users from 2 to atleast 5 users

  • @baopham6963
    @baopham6963 3 года назад

    so how to fix permission from android 10 to ... when we use share screen mobile android ios
    EglBase14Impl: Using OpenGL ES version 2
    D/OrientationAwareSC( 4730): OrientationAwareScreenCapturer: initialized and orientation isPortrait? false
    D/AndroidRuntime( 4730): Shutting down VM
    E/AndroidRuntime( 4730): FATAL EXCEPTION: main
    E/AndroidRuntime( 4730): Process: com.asss, PID: 4730
    E/AndroidRuntime( 4730): java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
    , please help me

  • @IqbalSingh-es7bb
    @IqbalSingh-es7bb 3 года назад

    hello your tutorial make my day thanks can you please do this flutter webrtc with node js and socket

  • @sever010
    @sever010 2 года назад

    Richtig Gutes Video . Hast du auch einen Deutschen Kanal ?

    • @FlutterExplained
      @FlutterExplained  2 года назад

      Hi danke dir, ich arbeite derzeit daran einige Videos ins deutsche zu übersetzen. Je nachdem wie es ankommt.
      Feedback ist immer willkommen :)
      ruclips.net/channel/UCqmeXH2B1_X-k3po9ODJnBw

  • @althafaralijaffarali1803
    @althafaralijaffarali1803 3 года назад

    Bro make a video on end to end encryption 🙃

  • @gofullstack
    @gofullstack 3 года назад

    It's obvious that webrtc with Flutter is hell. I've been trying to do something with it on my own with no success even as an experienced developer who has done something with webrtc in the past. Now I can't even get the app to run after installing the newer version of flutter webrtc

  • @stephenselvaraj8960
    @stephenselvaraj8960 3 года назад

    Super :)

  • @3kdevelopers185
    @3kdevelopers185 3 года назад +1

    Sir, Please make a Video on How to localize (pdf text change to user selected language text) Pdf document in flutter???
    ❤️ From Pakistan

    • @FlutterExplained
      @FlutterExplained  3 года назад

      Sounds quite difficult you problably need not only a translation package of your choice but also a pdf generator. I will add it to my video list thanks for the suggestion.

  • @kamalCode
    @kamalCode 3 года назад +1

    Flutter Multivendor E-commerce app

  • @sasama7132
    @sasama7132 6 месяцев назад

    I couldn't understand the firebase part can you help me just know what to do with firebase before making this flutter project or something please 🤍

  • @MuhammadIbrahim-cc4kb
    @MuhammadIbrahim-cc4kb 11 месяцев назад

    peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote answer sdp: Called in wrong state: stable
    E/flutter ( 6806): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unable to RTCPeerConnection::setRemoteDescription: peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote answer sdp: Called in wrong state: stable

  • @joachimsmityt
    @joachimsmityt 2 года назад

    Thank you very much for this wonderful tutorial! In 99% of the cases the "peerConnection?.onTrack" callback is not fired in the joinRoom method. I've spent several days now on this problem but I can't find the solution. Can you help me? Thanks

    • @devsda1
      @devsda1 Год назад

      Try adding the await keyword to signaling.openUserMedia(_localRenderer, _remoteRenderer);