WebRTC in 100 Seconds // Build a Video Chat app from Scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ค. 2024
  • Want to build your own peer-to-peer video chat app? WebRTC is a technology that creates a realtime connection between browsers where users can exchange audio/video streams fireship.io/lessons/webrtc-fi...
    00:00 WebRTC Explained
    02:01 Build your own Video Chat
    3:37 Code setup
    04:34 Peer Connection & Webcam
    06:49 Offer Signaling
    09:45 Answer Signaling
    Source Code
    github.com/fireship-io/webrtc...
    Useful Resources
    WebRTC Docs webrtc.org/
    Codelab webrtc.org/getting-started/fi...
    Signaling developer.mozilla.org/en-US/d...
    #webdev #js #100SecondsOfCode
    Install the quiz app 🤓
    iOS itunes.apple.com/us/app/fires...
    Android play.google.com/store/apps/de...
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    My VS Code Theme
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 443

  • @ecam90
    @ecam90 3 ปีที่แล้ว +187

    "This video would be a crazy 20 minutes long or something." - lol. this is why I love this channel.

  • @PrasangaBasnayake
    @PrasangaBasnayake 3 ปีที่แล้ว +260

    This video is 11 minutes and 18 seconds long and every second is valuable. Thank you.

    • @anupamadissanayake1299
      @anupamadissanayake1299 3 ปีที่แล้ว +2

      feels good to know that we have the same nationality

    • @PrasangaBasnayake
      @PrasangaBasnayake 3 ปีที่แล้ว

      @@anupamadissanayake1299 small world!

    • @alan-
      @alan- ปีที่แล้ว +1

      It would be a more useful tutorial if it was 20 mins long and not trying to compress everything down to the max.

  • @devsauce
    @devsauce 3 ปีที่แล้ว +424

    After 15 years of software dev, this channel is the best source of concise and nicely presented information for newcomers I've ever seen.
    Wish I had someone like Jeff back in my days. Well done, sir 🔥

    • @abiiranathan
      @abiiranathan 3 ปีที่แล้ว +12

      Not for new comers. Jeff's videos are tailored to intermediate to pro devs

    • @shanglee643
      @shanglee643 3 ปีที่แล้ว +1

      @@abiiranathan hi. can you help me a little bit. i am in big trouble in trying to generate SHA-1 key to use fire base.
      error: missing keystore
      imgur.com/a/vMV37OA.
      Something about deprecate gradle feature being used causing trouble. How to stop that?

    • @abiiranathan
      @abiiranathan 3 ปีที่แล้ว

      @@shanglee643 This was a web project. Setup for Android is different.

    • @shanglee643
      @shanglee643 3 ปีที่แล้ว

      @@abiiranathan i found out :
      add 'multidexEnable: true in defaultConfig{}
      at build.gradle(app level)

    • @shanglee643
      @shanglee643 3 ปีที่แล้ว

      @@abiiranathan no matter what the project, you still need SHA-1 key to use firebase right?

  • @LoveThatSceneChannel
    @LoveThatSceneChannel 3 ปีที่แล้ว +80

    I need a peer-to-peer connection of this channel to my brain

  • @klutch4198
    @klutch4198 3 ปีที่แล้ว +374

    Literally every single fireship video that comes out juices up any dev who watches it. Rumor has it, that if you watch every single fireship video at least three times you become the danger, end up with a six pack, and Javascript will write itself for you as it sings you to sleep

    • @acm1812
      @acm1812 3 ปีที่แล้ว +12

      Ultimate chad dev

    • @ayushijaiswal9813
      @ayushijaiswal9813 3 ปีที่แล้ว +12

      his style of not typing the whole code just undoing the snippet is awesome, saves a lot of time and doesn't get bored.
      this is the way tutorials should be.

    • @thecashewtrader3328
      @thecashewtrader3328 3 ปีที่แล้ว +1

      this

    • @imranq9241
      @imranq9241 ปีที่แล้ว

      These days JavaScript seems to write itself anyway for better or for worse

    • @Hacking-NASSA-with-HTML
      @Hacking-NASSA-with-HTML ปีที่แล้ว

      👎👎👎👎👎👎👎 paid bot

  • @-_-9034
    @-_-9034 3 ปีที่แล้ว +818

    yes.. now i can finally take down zoom

    • @PotatoMagnet
      @PotatoMagnet 3 ปีที่แล้ว +7

      😂😂😂😂😂😂😂😂😂😂

    • @toxaq
      @toxaq 3 ปีที่แล้ว +25

      Only if you don't want low latency high-res group chat. As-is the host is providing all the bandwidth, it quickly disappears as you add more callers. You'll need a TURN server to host multi-parties reliably and those aren't free.

    • @JosueRodriguez08
      @JosueRodriguez08 3 ปีที่แล้ว +32

      @@toxaq low latency high res on zoom....hahaha keep dreaming

    • @toxaq
      @toxaq 3 ปีที่แล้ว +8

      @@JosueRodriguez08 I don't use zoom but the setup as in this demo is misleading. It quickly falls apart with any attempt to scale without TURN.

    • @hamzaelalaoui7690
      @hamzaelalaoui7690 3 ปีที่แล้ว

      😁😁😁😁🤣🤣👌🏻👌🏻

  • @istainblack
    @istainblack 3 ปีที่แล้ว +12

    This channel is awesome. My job (in software) often gets me down, but this channel makes me remember the magic! Thank you.

  • @FilledStacks
    @FilledStacks 3 ปีที่แล้ว +13

    Video chat in 9 minutes! That's awesome, there's actually a lot of companies looking to get this kind of functionality built at the moment. Great video as always! You're Inspiring me to think of a Flutter version if I can get some time.

  • @omaryassir5885
    @omaryassir5885 3 ปีที่แล้ว +296

    This channel is a treasure ✨

  • @talhaibnemahmud
    @talhaibnemahmud 3 ปีที่แล้ว +2

    I was working on a video streaming project and was waiting for this video to implement the feature in the best possible way.
    Thanks a lot!

  • @mbadpa
    @mbadpa 3 ปีที่แล้ว +3

    Most of the new things I learn is from this legendary channel. I hope more people out about it.

  • @Vivek2062
    @Vivek2062 3 ปีที่แล้ว +6

    Most awaited video of all time, thanks Jeff! 💯

  • @ranaakhil
    @ranaakhil 3 ปีที่แล้ว +2

    I very clearly remember asking for this in your web sockets video.
    Thank you so much. Your content is the best.

  • @joaquimley
    @joaquimley 3 ปีที่แล้ว

    I have no words for the quality of your content. Pure gold.

  • @DavidVerzolla
    @DavidVerzolla 3 ปีที่แล้ว +35

    Would be nice if they make a new 100 videos talking about webRTC and multi-peer connection. Up vote here. 🚀

  • @user-cj3yu9nv1u
    @user-cj3yu9nv1u 3 ปีที่แล้ว +2

    Fireship bringing you the latest and greatest tech content. Great video as always! 🔥

  • @krithiksankar2081
    @krithiksankar2081 3 ปีที่แล้ว +2

    I was just about to start working on a project based on webRTC. Just what I needed. Thanks!!!

  • @leoliveirab
    @leoliveirab 3 ปีที่แล้ว +3

    I learn so much on this channel. Great content! Definitely one of the best webdev channels on TH-cam. Thanks from Brazil ✌🏼

  • @_romeopeter
    @_romeopeter 2 ปีที่แล้ว

    This was super fun to watch 🔥
    That signaling process did take a while.

  • @jakubwegrzyn3798
    @jakubwegrzyn3798 3 ปีที่แล้ว +94

    Thank you for vanilla JS 💪

  • @CodingNuggets
    @CodingNuggets 3 ปีที่แล้ว +6

    That was hilarious about the cat. I remember seeing that. Really appreciate this video on WebRTC. Very interesting. Much love and respect. See you soon!

  • @igorordecha
    @igorordecha 3 ปีที่แล้ว +30

    People in the poll voting for webRTC demo in React: "The senate will decide your fate"
    Fireship: "I am the senate"

  • @vineetyadav6978
    @vineetyadav6978 3 ปีที่แล้ว

    yes, I've been wanting this for so long. thank you good sir!

  • @eduardointech
    @eduardointech 3 ปีที่แล้ว

    Great format! nice addition to the 100 seconds

  • @temmmbebkd2922
    @temmmbebkd2922 3 ปีที่แล้ว +2

    Omg i needed this what the heck,the timing is insane 🤯

  • @fahad.hossain
    @fahad.hossain 3 ปีที่แล้ว +1

    I was waiting for this. Thank you.

  • @cherriepie
    @cherriepie 3 ปีที่แล้ว +4

    I've been wanting to build a video call app for ages!! But the tutorials are on it are so complex!!

  • @arvind6007
    @arvind6007 3 ปีที่แล้ว +2

    No one can teach u like man, You are a Legend

  • @AS-hs4xk
    @AS-hs4xk 3 ปีที่แล้ว

    Thank you for listening to comments and using vanilla version
    Love your channel

  • @MiquelCanal
    @MiquelCanal 3 ปีที่แล้ว

    Clean and concise information, great video!
    Thanks for sharing

  • @brindhas8907
    @brindhas8907 3 ปีที่แล้ว

    Fully fire.. every single second. Thank you for sharing.

  • @Helleynea
    @Helleynea 3 ปีที่แล้ว

    I didn't even know I wanted this explanation. Thanks.

  • @jonathanchavez9203
    @jonathanchavez9203 3 ปีที่แล้ว +1

    This series is amazing!!!

  • @dsi-films1264
    @dsi-films1264 3 ปีที่แล้ว

    Just what I was looking for, thank you!

  • @parthipankalayini8
    @parthipankalayini8 3 ปีที่แล้ว +1

    Most hyped && Awaited video 🔥🔥🔥

  • @adityakumar4200
    @adityakumar4200 3 ปีที่แล้ว

    Thanks for making this video.It gonna help me in my final year project.

  • @scheimong
    @scheimong 3 ปีที่แล้ว +8

    I love how you used the footage from the guy testifying as a cat

  • @ThePhrenchen
    @ThePhrenchen 3 ปีที่แล้ว

    will definetly see you in the next one! thank you

  • @timurtek
    @timurtek 2 ปีที่แล้ว

    Thank you for the tutorial, this is amazing!

  • @shootnado
    @shootnado 3 ปีที่แล้ว

    This video is pure educational mastery.

  • @hitthemoney
    @hitthemoney 3 ปีที่แล้ว

    I have been waiting for this!

  • @wenniecatabay7094
    @wenniecatabay7094 3 ปีที่แล้ว

    wow, amazing, simple video but lot of knowledge, Thanks for this tutorial.

  • @raniketram
    @raniketram 3 ปีที่แล้ว

    Finally it's here, thanks Jeff

  • @birdofhermes6152
    @birdofhermes6152 ปีที่แล้ว

    Thanks Jeff. The lesson on Fireship was useful.

  • @lallawmzualakhawlhring7340
    @lallawmzualakhawlhring7340 3 ปีที่แล้ว +4

    I think I felt my brain just grew watching this.... Thank you for the valuable information. Can you do a short video about OTT(Netflix, Amazon prime type) next kind sir?

  • @ThomasOrlita
    @ThomasOrlita 3 ปีที่แล้ว +5

    Awesome tutorial, I wish it existed a few years ago. By the way, not sure if you mentioned it, in cases when a direct connection cannot be established (e.g. in a corporate or school network), you can use a TURN server to relay the media data. I think it might be needed in something like 20% of the cases (not sure).

  • @exyios8493
    @exyios8493 3 ปีที่แล้ว +6

    OMG this is perfectly timed i was thinking about how to make a video chat app and this dropped thank you!

  • @kettenbach
    @kettenbach 3 ปีที่แล้ว +3

    Makes my day when you mention @angular 😍👊

  • @chillmusichour
    @chillmusichour 3 ปีที่แล้ว +1

    You're the absolute man Jeff

  • @edwincarlsson9014
    @edwincarlsson9014 3 ปีที่แล้ว +23

    Oh my christ. I've been looking forward to this.

  • @_parassolanki
    @_parassolanki 3 ปีที่แล้ว

    Great video.
    My favourite programming channel..

  • @erreerre2001
    @erreerre2001 3 ปีที่แล้ว

    OMG just trying to add video calling on a React Native app with webRtc and I got the notification!!! Awesome!

  • @djsnooppyzatdepoet7568
    @djsnooppyzatdepoet7568 3 ปีที่แล้ว

    Man, you really know how to choose perfect meme videos for the videos. 'Am not a cat'

  •  3 ปีที่แล้ว

    Someone has already told it but thanks for bringing it using Vanilla JS. And also thanks a ton for the quality of the video. :)

  • @islombekhasanov
    @islombekhasanov 2 ปีที่แล้ว

    wow! so easy! thank you Fireguy from Fireship!

  • @CodeJan
    @CodeJan 3 ปีที่แล้ว

    Omg, I've searched for that yesterday!!!

  • @MisterAndreSafari
    @MisterAndreSafari 3 ปีที่แล้ว +1

    Amazin explaining-skills in this one :-) .... THX for your effort and sharing your talent with us!!

  • @anouarzougrar8332
    @anouarzougrar8332 3 ปีที่แล้ว

    JUST.. THANK YOU MAN 🙌🏻🙌🏻

  • @YexyYT
    @YexyYT 2 ปีที่แล้ว +12

    For all those here in 2022 this tutorial is for an older version of the Firebase SDK. The newer SDK is in modular which require different import notation and greatly changed syntax. Please be weary when following. The is a great reference to learn from but there are much more up to date options out there right now.

    • @dandyiy
      @dandyiy 2 ปีที่แล้ว

      thx

    • @Daniel32396
      @Daniel32396 2 ปีที่แล้ว

      Can you point us to some updated instructions? What do you recommend for streaming very low latency video? That's all I'm interested in.

    • @beng6319
      @beng6319 2 ปีที่แล้ว

      I've been trying to get this to work for about a week now. I feel so lost.

    • @vovithenoob
      @vovithenoob ปีที่แล้ว

      would be appriciated if someone knows the updated import, can't find it. Thanks

  • @unknownman1
    @unknownman1 3 ปีที่แล้ว +1

    Jesus Christ, the video is so informative. Need to watch all videos of this channel

  • @ViniciusBuscacio
    @ViniciusBuscacio ปีที่แล้ว

    This channel is incredible!!!

  • @ramananfinsceal1319
    @ramananfinsceal1319 3 ปีที่แล้ว +18

    Seriously. I couldn't belive. I was studying abt Web RTC and ur notification popped.
    Are you eavesdropping 🤪

    • @shrn
      @shrn 3 ปีที่แล้ว

      I just started working on a project and it popped up

  • @baolee4622
    @baolee4622 3 ปีที่แล้ว

    so advanced. I need time to cover it. btw, it's so useful. many tks

  • @danielborges.
    @danielborges. 3 ปีที่แล้ว +1

    Great tutorial! I would love to see one tut about webrtc with angular. Take care.

  • @chanokplaisub3586
    @chanokplaisub3586 7 หลายเดือนก่อน

    This is really work🎉🎉 good explanations and examples

  • @nlattessi
    @nlattessi 3 ปีที่แล้ว +4

    gRPC in 100 seconds please! love your channel ❤️

  • @tuxdoesstuff
    @tuxdoesstuff 3 ปีที่แล้ว

    Finally- Thank you ❤️

  • @jeromearenas4857
    @jeromearenas4857 3 ปีที่แล้ว

    Thank you for sharing your knowledge sir.

  • @prakhyathshetty
    @prakhyathshetty 3 ปีที่แล้ว

    Most awaited!!

  • @carlomigueldy
    @carlomigueldy 3 ปีที่แล้ว

    Fireship is the best YT dev channel

  • @abiiranathan
    @abiiranathan 3 ปีที่แล้ว

    Just as promised. Thanks Jeff

  • @pranavbonthala1242
    @pranavbonthala1242 3 ปีที่แล้ว +1

    lol so early for the first time
    Btw very nice video man!

  • @adelarsq
    @adelarsq 3 ปีที่แล้ว

    You are my hero! 👏🏻

  • @justins4996
    @justins4996 3 ปีที่แล้ว

    Fantastic! Thanks!

  • @juanmartinguillen4876
    @juanmartinguillen4876 3 ปีที่แล้ว +6

    Beside the fact that the contents of the video excels in many aspects, I would like to highlight the fact that it does not follow the illusion dominating the development scene where everything should be React or it is not considered web development anymore. Thank you for that.

  • @dr.d3600
    @dr.d3600 3 ปีที่แล้ว

    Through Jeff everything are clear!

  • @simonbrandner
    @simonbrandner 3 ปีที่แล้ว +4

    Great video! A video about MCUs, SFUs, meshing and multi-stream WebRTC would be awesome!

    • @Fireship
      @Fireship  3 ปีที่แล้ว +21

      If there's enough demand, I would make a full course that covers multiple connections and tradeoffs of different approaches.

    • @yitzchakpachtman9664
      @yitzchakpachtman9664 3 ปีที่แล้ว

      @@Fireship SIP B2B UA's like Asterisk also offer SFUs. Very few people have figured it out with Asterisk tho. I would purchase the course if you make one!

    • @raivatshah7781
      @raivatshah7781 3 ปีที่แล้ว +2

      @@Fireship There is demand!! Pls do one on multi-stream!! And if possible, can you please cover the Data Channel as well?

    • @Hacking-NASSA-with-HTML
      @Hacking-NASSA-with-HTML ปีที่แล้ว

      👎👎👎👎👎👎👎 paid bot

  • @muheirwe
    @muheirwe 3 ปีที่แล้ว

    You guys are amazing thanks

  • @maulikshah28
    @maulikshah28 3 ปีที่แล้ว +1

    This is beautiful

  • @professeurish
    @professeurish ปีที่แล้ว

    Thank you man

  • @lakshaynz
    @lakshaynz ปีที่แล้ว

    Magic! Thank you

  • @maoryatskan6346
    @maoryatskan6346 3 ปีที่แล้ว

    Thank you so much, exactly what I was looking for.

  • @kecoje
    @kecoje 3 ปีที่แล้ว

    Where do you get ideas for all these videos? You're following all the latest tech trends. Great video

  • @muheirwe
    @muheirwe 3 ปีที่แล้ว

    Nice video thank you

  • @shubhammane542
    @shubhammane542 3 ปีที่แล้ว

    This Channel is a 💎.

  • @Tomasrts
    @Tomasrts 3 ปีที่แล้ว

    Great content 🔥

  • @Nermin913
    @Nermin913 3 ปีที่แล้ว

    I have never subscribed this fast

  • @Babakinha
    @Babakinha 3 ปีที่แล้ว +4

    Finally, i tried WebRTC a year ago and didn't understand nothing, now im building discord 2 lol

  • @osamaa.h.altameemi5592
    @osamaa.h.altameemi5592 3 ปีที่แล้ว +1

    fantastic video, how is the networking aspect different from NAT-punch-through?

  • @eddwinpaz
    @eddwinpaz 2 ปีที่แล้ว

    it would be interesting if you could make a websocket version of it. this is the most clean code I've seen amoung other tutorials.

  • @test-kx9qx
    @test-kx9qx 2 ปีที่แล้ว

    Thanks for the great content. How would we do if I want to emit my webcam and other users can see without them to have to stream theirs as well?

  • @deathkillertech
    @deathkillertech 3 ปีที่แล้ว

    You surpass my expectations

  • @alherrera9390
    @alherrera9390 3 ปีที่แล้ว

    It just works. But a third party can still directly see and even store your streams. I´d use sockets over my own infraestructure for enterprise apps, totally worth the extra time for implementation.

  • @arnavbansal8159
    @arnavbansal8159 3 ปีที่แล้ว +1

    Hey! Great Video! Could you also please make an example for one to many video calling?

  • @koenbrink
    @koenbrink 3 ปีที่แล้ว

    would this also be relevant for server-client audio/video streaming, or is webRTC really only focussed on p2p connections as you describe in this video?

  • @ejslondontech
    @ejslondontech 3 ปีที่แล้ว

    Awesome Video! What do I need to change in the main.js to make it work? Thanks

  • @MrJasonFrank
    @MrJasonFrank 3 ปีที่แล้ว +1

    How could this implementation be extended to handle multiple people (more than 2) connecting to the same session?

  • @joseisraeldiazzapata5179
    @joseisraeldiazzapata5179 2 ปีที่แล้ว

    Awesome, i have a question i hope can receive advices. What should i do if i need to share a Chrome tab with audio to participants and also can use my mic at any time. It's like 2 independent audio streams through webrtc. Pls help

  • @gaditzkhori6846
    @gaditzkhori6846 2 ปีที่แล้ว

    Thanks!
    When tried to add rtc data channel the channel was not opening and was stale on connecting state

  • @mohanaggarwal4058
    @mohanaggarwal4058 3 ปีที่แล้ว

    Literally, one of the best youtube channel for web developers and enthusiasts!!😍😍