How To Create A Video Chat App With WebRTC

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

Комментарии • 1,9 тыс.

  • @llampwall
    @llampwall 4 года назад +220

    I like how you just set up from nothing. No dev environment stuff, no starter kit, just npm init. Makes me think about stuff in a lower level way. Makes me realize a lot of stuff is simpler than I’m making it.

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

      Yeah, man. I feel you...
      With these videos I understand the concept of MVP

    • @PabloGnesutta
      @PabloGnesutta 2 года назад +11

      The stuff is not simpler than you are making it... You are just relying on libraries that do all the work for you and end up not understanding how the technology you use works at all

    • @PabloGnesutta
      @PabloGnesutta 2 года назад +22

      How is this at all making you think in a lower level way? It can't get higher level than this!

    • @fxstreamer238
      @fxstreamer238 2 года назад +10

      main stream nonsense to make the video longer apparently always appeals to people like you. how many times he has to create a server with npm init and express? The guy used to be a good youtuber but as he grew his channel he became robotic . focusing on trivial tasks like DOM and server creation and repeating the arguments as he is typing and calling it "explanation" . Rather than talking about the bone of WebRTC. ICe candidates SDP , NAT difficulties for symmetrical routers, TURN and STUN servers. Hell he didnt even mention that peerJS has limitations .

  • @jerryjeremy4038
    @jerryjeremy4038 4 года назад +40

    This guy is so dedicated at helping devs like me. Thanks bro

  • @sarpedonmontecarlo8397
    @sarpedonmontecarlo8397 4 года назад +31

    a simple, comprehensive, useful and well structured tutorial with nice and clean code, and an ASMR'ish voice along the way which was an amazing learning and experience for me! thanks to all in Web Dev Simplified, Cheers to all of you guys!

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

      "comprehensive" LMFAO . You didnt comprehend sht about webrtc with this video.

  • @unknown-frames
    @unknown-frames Год назад +1

    This helped me a lot really!. I am on a webRTC project, this is the best tutorial I saw to get basic undestanding. Thanks a lot

  • @ibikunleshuaib7187
    @ibikunleshuaib7187 4 года назад +43

    I had intended writing a blog post today but this is way more interesting project to do today. Thanks Kyle.

  • @DeltaStudios1
    @DeltaStudios1 4 года назад +26

    it would be interesting to see more flushed out UI for something like this. Great video Kyle, cheers man!

  • @KandMe1
    @KandMe1 4 года назад +6

    Just wanted to add a thank you and just to say yours is probably the first decent tutorial on coding I ever followed. Took my one evening to download and start to figure out the IDE but now I am going fine with it. It was a challenge but it's like your teaching us to climb and tree the others taught how to flutter about from leaf to leaf.

  • @xavi_6767
    @xavi_6767 4 года назад +46

    What's better than 1 single kyle simplifying the web. That's 4.

  • @dummypg6129
    @dummypg6129 4 года назад +6

    I can say i am good with python, and it really amazes me when I am watching node tutorials. I dont even need it for something, i am just watching it.

  • @zenoteks
    @zenoteks 4 года назад +7

    After watching this, I could not resist subscribing to your channel immediately. You were awesome

  • @SantoshGupta-tv4mp
    @SantoshGupta-tv4mp 4 года назад +1

    Men you are great .I have already seen this code in youtube channel Cleaver programming . They were shit talking nonsense which never make sense why we are doing some particular code . I was so confused and started searching for webRTC , peer , socket and what not. But then I seen your video by God grace and everything is making sense now . Thank you very much sir❤️.

  • @harshitsantosh825
    @harshitsantosh825 4 года назад +4

    Thanks for demystifying WebRTC. I was searching for such kind of video since March 2020. No one taught the full execution of the project. Thanks a lot man.

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

      This does not demistify webrtc. In fact there is no single line of webrtc implementation code. It just shows how to use peers js which does all the work for you

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

      This just uses TCP sockets, not WebRTC. I dont know why it says WebRTC on the title ? Maybe to confuse new learners.

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

    Information is such an incredibly important thing. And presenting it in a helpful way to those who do not yet have it deserves massive remuneration. Until then, thank you.

  • @Salehalanazi-7
    @Salehalanazi-7 4 года назад +43

    This is incredible. I would've killed for content like this 5 years ago, similar to the coronavirus search extension it really broke my fear of Chrome extensions and eventually I made a Chrome extension that checks if tweets are spam with ML api and hides tweets.
    Thanks Kyle

    • @AndreasDelleske
      @AndreasDelleske 4 года назад +1

      Sal7_one webRTC had been in a bad state in all browsers back then if I remember well...

  • @waddkara
    @waddkara 4 года назад +23

    Thank you man you and Brad taught me all I know in web development

    • @tazubacyrus5361
      @tazubacyrus5361 4 года назад +2

      Brad is another great guy. I can't even compare him to the years I spent in college.How i wish i had known him before. I wouldn't have wasted my years in college.

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

    Thanks Kyle!, but got a contribution to you this time. Makes me happy to be able to help.
    I can confirm, after a lot of work that Kyle's code has a major flaw in it, that will make it not work in many occasions. Here is the problem, when you call the nonsynchronous function that returns the user stream, the promise takes an unpredictable amount of time to return, what that does to you is to create a situation where the remote client can receive a call from the originator client without the remote have had set up the peer.on('call', ....{...}) listener function. Then the 'call' event gets lost and the behavior will be highly dependent on your environment, since it is dependant on how long it takes for the promise to return. I looked all over the internet and could find what was going on, so I ended up having to figure it out the difficult way. Now I changed the code so that you call the event handler first async peer.on('call" and then from inside the handler I call the navigator.mediaDevices.getUserMedia function. And then everything works. For those of you that want more details, please go to github, where I placed the complete code of a working example (today 7/19/2021) of an incomplete app that handles n rooms. No idea what the limit of n is for now. It is not production ready, but it allows you to open as many windows as you want between browser tabs. I based it on another tutorial, that didn't work either!, and explain everything in the readme.md file Good luck and happy programming! and thanks to Kyle for this video. I got me started!

  • @sanket.hosalli
    @sanket.hosalli 2 года назад

    man!!! This guy's got a sense of humor for explanation.

  • @josealuis607
    @josealuis607 4 года назад +826

    Zoom has been really quiet since this video came out 💀

    • @ArpanCodes
      @ArpanCodes 4 года назад +38

      This video came out like 5 minutes ago :/

    • @josealuis607
      @josealuis607 4 года назад +128

      @@ArpanCodes you must be the king of the parties with that sense of humor

    • @leomarquez2349
      @leomarquez2349 4 года назад +8

      they have 24 hours to respond, no cap 😂

    • @Anonymous-kw7ls
      @Anonymous-kw7ls 4 года назад

      @@ArpanCodes
      😂😂

    • @godloven.6564
      @godloven.6564 4 года назад

      @Arpan Codes 😂😂😂

  • @binarygnome
    @binarygnome 4 года назад +10

    You're videos have helped me so much in my own programming and web development, and I want to say thank you. Projects like these take concepts and shows us real world applications for them,and by following along, we get to experiment and learn along with you.

  • @ArpanCodes
    @ArpanCodes 4 года назад +214

    since you prefer using shorthand like npm 'i' for 'install' you might wanna use '-D' instead of '--save-dev' :)

    • @nocturno7887
      @nocturno7887 4 года назад +2

      Thanks

    • @koreanbroadcastarchive306
      @koreanbroadcastarchive306 4 года назад +1

      @Wafi Hartono Laughed at this one :)

    • @ArpanCodes
      @ArpanCodes 4 года назад +1

      @Wafi Hartono you're missing out then 😂

    • @vincentjonathan4529
      @vincentjonathan4529 4 года назад +7

      @Wafi Hartono actually its D, because the D is big ;)

    • @dnynu
      @dnynu 4 года назад +1

      If you have latest version then you need not have to add save it will automatically add all dependencies related with it.

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

    Thanks a lot. After I've been watching hours of theoretical video, this API is much simpler and clear to jump in and start something with that

  • @oskarmarkin5674
    @oskarmarkin5674 4 года назад +115

    Welcome to web dev simplified “tImEs FoUr” 😂

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

    I do not subscribe for more videos, I do subscribe to support this guys that share knowledge

  • @Mapko0
    @Mapko0 3 года назад +4

    You should do a episode 2 of this and address the client memory leak problems and other issues that may occur. Kudos to you for the presentation and simplification of the code. keep it up.

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

    you just made me lots of money with this video, thanks brother!

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

    This was absolutely brilliant. It clearly shows the concepts and paradigms. Good job!

  • @mrhonrer
    @mrhonrer 4 года назад +12

    I just want to let you know that you are carrying my Comp Science degree

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

      I wish, as a society, we had a way to reimburse people who make valuable creations like this, for their work.

  • @felipepontilho3921
    @felipepontilho3921 4 года назад +6

    This is AWESOME! Now I have a cool study project for the weekend. Thank you, Kyle. You rock!!! 🤘👍🏻👏🏼👏🏼👏🏼

  • @six1free
    @six1free 4 года назад +1

    that was beautiful, I've been searching for this video for weeks now (note the date!) and none of the videos I found explained it so simply/so well much thanks - if anyone has problems getting it to run somewhere other than localhost, it's because you need https for mediaDevices now (except for localhost)

    • @pozaking96
      @pozaking96 4 года назад +1

      can you explain it more in detail, what we need to change to run it with https?

    • @six1free
      @six1free 4 года назад +1

      @@pozaking96 it took me pretty much since I've written that comment to implement it, but i finally got it working... trying to route it through an nginx reverse proxy ended in nogo... lets see, sorry if i miss anything watch for edits ;)
      first and mainly, on the require('http') you of course need to set it to https and give a cert and key (man has that process changed in the 2-3 years since I've done it last!) once you get the certs (if you don't know how, google it, it's a whole other 3 page essay) it's basically the same {} object as for the peerjs (far below) with these lines: (replacing the require('http').server(app); line)
      const fs = require('fs');
      const server = require('https').createServer({
      key: fs.readFileSync('/path/to/my/ssl/cert/key');
      cert: fs.readFileSync('/path/to/my/ssl/cert/cer');
      }, app);
      second, I'm not sure if the peer server needs it, but just in case I modified the top of script.js's peerjs parameters to include secure:true
      third, likewise unsure if mandatory but certainly better than running two node instances, I edited server.js to incorporate a peerJS server with the following lines:
      const PeerServer = require("peer").PeerServer;
      var peer_server = PeerServer({
      port: 3001,
      ssl: {
      key: fs.readFileSync('/path/to/my/ssl/cert/key'),
      cert: fs.readFileSync('/path/to/my/ssl/cert/cer')
      },
      allow_discover: true; //not sure why
      });
      console.log('*** peer server running on port 3001');
      fourth, countless more changes including adding in a mute button and using different ports, source input changing and aliases... I don't think any were related to the SSL but let me know if it doesn't work... and you can see that it should at virc.ceneezer.com - note it's still in testing mode, my script.js should probably not be copied, fair warning ;)

    • @pozaking96
      @pozaking96 4 года назад +1

      @@six1free thank you so much for your answer ! Will try it out later today!

    • @miku1982
      @miku1982 4 года назад +2

      @@six1free yay, after some syntax errors I made it work with your hints... I just want to add:
      The semicolons did not work for me(at least within the objects). Delete all and replace with comma where needed(Key-Value pairs within objects)
      And... to get a self-signed certificate(yes it's not trusted... but works at least for my purpose) you can google a 3-pager or just linuxize.com/post/creating-a-self-signed-ssl-certificate/ or just make sure you have openssl installed and run:
      openssl req -newkey rsa:4096 \
      -x509 \
      -sha256 \
      -days 3650 \
      -nodes \
      -out cer \
      -keyout key
      Copy then the cer and key files where you want to have them (ssl folder?) and adapt the lines in server.js pointing to these relative to your server.js -> ie
      key: fs.readFileSync('ssl/key'),
      thanks for your help again

    • @six1free
      @six1free 4 года назад

      @@miku1982 might have been a few typeos, it was re-typed not copypastad - glad you got it

  • @manugalaxy14
    @manugalaxy14 4 года назад +6

    For new people watching this video: Testing this on mobile devices might not work as navigator.mediaDevices will be undefined on android phones even if you test it on localhost as it requires a "secure context" meaning you need to test it using a HTTPS context.

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

      Hello Manu! Right. ran into this problem yesterday night. Tried to setup secure context for localhost, but chrome doesn't seem to bite! Could you send me in the right direction? thanks so much!

  • @tazubacyrus5361
    @tazubacyrus5361 4 года назад +1

    guy you are incredible. I came to know about your channel after the video you published on brads channel . great job.

    • @dimitargetsov9690
      @dimitargetsov9690 4 года назад

      @Tazuba Cyrus
      Please, please send me that video URL!!! I am ready to PAY for that.

  • @GiannisKarmas
    @GiannisKarmas 4 года назад +7

    Can you please do a simple-peer version of this? Just an addition on the main differences would suffice. Webrtc is difficult to understand by nature and having more examples would make things so much cleaner. Many thanks 😊

  • @voidmind
    @voidmind 4 года назад +1

    WebRTC is one of the least documented feature of modern browsers. I doesn't surprise me this video did so well.

  • @shoaibkiyani9813
    @shoaibkiyani9813 4 года назад +1

    He is an awesome teacher. I wish I had him in my university :)

  • @aaronbaraiya3692
    @aaronbaraiya3692 4 года назад +8

    i was just going to watch for around 3 minutes but ended up watching the whole thing

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

    You cracked it bro amazing 🌟

  • @ethanleo3365
    @ethanleo3365 4 года назад +15

    This is a really great tutorial to me to understand how to create a video chat application.
    However, I would like to point out that this video only goes through the basics which is that of setting up the connection between users and I do wish that you could make a tutorials (or a series hopefully) on creating a video conferencing application that includes functionalities such as creating a room, inviting users where users are actual users that people can create themselves rather than using peer.js to handle the users. Another thing I wish to see is if you could actually show how to go about implementing mute/unmute and enable/disable video functionality. Also, perhaps you could also show how to handle deployment too.
    Other than that, the video is quite a straightforward and useful video for the basics. I do appreciate this tutorial and I hope that you can take in my suggestion.

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

    This video is crazy simple and easy to follow. Thanks alot

  • @codingmasteryt2021
    @codingmasteryt2021 4 года назад +4

    Wow, exactly what I needed! Thanks Kyle!

  • @allanregista4422
    @allanregista4422 4 года назад +1

    Been watching for your vids for quite while, but as soon as i see this video i subbed. Man, you're truly amazing, u made some thing complicated far less terrifying an less horror.. thumbs up 👍👍👍 may god bless you brother 🙏

  • @mostafabohram
    @mostafabohram 4 года назад +36

    Best intro ever 😂

    • @bananavrrr
      @bananavrrr 4 года назад

      So fun😂😂😂😂😂ny I am so 😂😂😂😂😂 sorry I need to edit it sOrYy

  • @hakienet3897
    @hakienet3897 4 года назад +299

    alternative title: i made a more secure zoom clone in 28 minutes

    • @FinlayDaG33k
      @FinlayDaG33k 4 года назад +6

      I was just about to comment: "Probably more secure as well" :^)

    • @prakharpandey6009
      @prakharpandey6009 4 года назад +2

      How

    • @FinlayDaG33k
      @FinlayDaG33k 4 года назад +8

      @@prakharpandey6009 Step one: actually do something about security.
      Step two: there is none, you're now more secure than Zoom.

    • @peacockmangolotus3483
      @peacockmangolotus3483 4 года назад +3

      Indian apps started to arise in the play store. Do you know the alternate apps created by Indians for camscanner, share it, here is a list of them at poornichefacts.blogspot.com/2020/07/banning-that-paved-road-to-success-for.html

    • @amruthap6334
      @amruthap6334 4 года назад +6

      i have tried and also downloaded your code but still the second user is not adding in the page. what should i do ???? PLease help. btw i m working on firefox. is that the problem ?????

  • @JahangirJadi
    @JahangirJadi 3 года назад +4

    On start of the video you had your phone connected to the server. How did you do that?

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

    This code will make the world a better place!

  • @maksym.pryhoda
    @maksym.pryhoda 2 года назад +5

    10.12.2022 At 14:58 just omit 'broadcast', type instead 'socket.to(roomId).emit('user-connected', userId)'

  • @PilotGT
    @PilotGT 4 года назад +7

    Great video. Thanks for posting! Would love to see a follow-up video that shows how to deploy the app to heroku, netlify, etc. Again, well done!

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

      I made some progress on this by setting my domain name to point to my routers public IP address. Then I have my router port forwarding port 8080 traffic to my computer behind the router. I also changed the port in the serve.js file to use port 8080. Now it all works if I use local host but when I access using my domain name I get redirected to the roomId but no video shows. Does it need another protocol open for the video traffic like UDP?

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

      I dont think heroku supports running two servers on different ports

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

    I love your neat and clean way of coding and clean setup

  • @mvrdara
    @mvrdara 4 года назад +4

    Would love to see more real world apps cloned. Thanks.

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

    this is a really helpful tutorial kyle.. you are great, Please add a screen share option from one to many users

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

    Great video. It would have been nice to show a diagram of how all the libraries work together to get the big picture while building it though.

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

    Thanks!

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

      WOW! Thank you so much for the support! I am really glad that you enjoyed the video.

  • @tannerbarcelos6880
    @tannerbarcelos6880 4 года назад +5

    I literally have been thinking about something like this the past week . Get out of my head! 😂

    • @IshanKesharwani
      @IshanKesharwani 4 года назад

      Seriously, i wanted to design this one too but I never knew where to start.

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

    Very good tutorial on WebRTC, thank you so much! I've been meaning to pour over material on this, and your video just saved a whole lot of time in that. Thank you!

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

      This is not a tutorial on webrtc. Is a tutorial on peers js

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

      @@PabloGnesutta Not the inner parts of webRTC but it uses the technology thru peer server

    • @PabloGnesutta
      @PabloGnesutta Год назад +2

      @@hugomcm1 yeah but it's like saying that your are creating a web application with c++ because you are using javascript which runs on top of a browser which is made on c++... It's misleading.
      In this video you don't learn anything about webrtc

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

      @@PabloGnesutta true

  • @khanhammadkhan451
    @khanhammadkhan451 4 года назад +6

    18:17 When I goto console it is not shown "User connected ..id".

    • @김은진-w3g
      @김은진-w3g 4 года назад +1

      How did you fix it?

    • @khanhammadkhan451
      @khanhammadkhan451 4 года назад +2

      @@김은진-w3g I've tried but couldn't find the solution than I just ignored it and proceeded forward

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

    I was mistaken, great tutorial just needs npm start when you close the project, thank you for this video and apologies for the last comment

  • @963design8
    @963design8 2 года назад +4

    I got an issue at the moment peerjs try to connect i fot ERR CONNECTION REFUSED, i am running the code as it is on github and only shows your current camera, no incomming video is shown.

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

    You are awesome, Intelligent, smart also..i like the way you teach

  • @troys1426
    @troys1426 4 года назад +60

    This should be renamed to: “How to be an instant millionaire in just one or three videos.

    • @AndreasDelleske
      @AndreasDelleske 4 года назад +1

      Troy Serapio Zoom will be furious!

    • @RekhaGujar83
      @RekhaGujar83 4 года назад +4

      Hi I also created this type of app : call.rekhagujar.repl.co please visit

    • @ADeeSHUPA
      @ADeeSHUPA 4 года назад +1

      @@RekhaGujar83 uP

    • @troys1426
      @troys1426 4 года назад +1

      @@RekhaGujar83 Its really nice

    • @AmanSingh-xo5hf
      @AmanSingh-xo5hf 4 года назад +2

      @@RekhaGujar83 please help me...I am getting only one screen after using this

  • @andrey_lunar
    @andrey_lunar 4 года назад +1

    I understood nothing, but still it’s very exciting! :)

  • @vanajmoorthy4018
    @vanajmoorthy4018 4 года назад +8

    How would you deploy this and add in some functionality for users to create rooms?

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

    looks like the room is the MD5 code of the name of the room you typed in. I love how the video goes away when you close the other browser. I saw another guy do this using javascript using html video link and a js script.

  • @rickyzheng572
    @rickyzheng572 4 года назад +11

    Can you do an electron.js tutorial or some machine learning topics using js?

  • @Th3Younesse
    @Th3Younesse 11 месяцев назад

    thanks you so much this video really helped me with implementing peerjs in nextjs

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

    breaking changes to socket. Please do an update.

  • @deveshkaushik6375
    @deveshkaushik6375 4 года назад +2

    Thanks, Kyle, a video on modification needed, to make it work on Heroku would be great

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

    I am not able to see the 2nd grid when the second person connects. How to solve this? I have actually compared the source code line-by-line. Everything is the same, but still facing this issue.

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

      Please anyone reply i am also facing the same issue

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

      I think maybe u didnt connected the peer server

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

      @@yashkhare7308 yes, even I get the different ids which are connected but not the 2 videos in the same page.

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

      Same i am also not getting 2 videos in the same page but in console the user is getting connected

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

      Yeah, same issue

  • @DaRealTT
    @DaRealTT 4 года назад

    I have no idea why, but, everything else I tried went well except the cameras in the call. I still like it though. You helped made me program a camera!

  • @rishavkumar8718
    @rishavkumar8718 2 года назад +4

    A bug a coming. Let say user1 connected first and then user2 connected, if user1 disconnects then video element of user1 is not getting removed from user 2 (a blank non-streaming box will be there). How to fix that?
    Thanks for the video though, very helpful

  • @15pratapreddy
    @15pratapreddy 4 года назад

    0:21 to 0:34 - INNOVATIVE INTRO :)

  • @rs-zl7re
    @rs-zl7re 4 года назад +11

    Good tutorial as usually but too advance for me now, I just started learning CSS, HTML and Javascript. Probabaly I would get it when I start a project.

  • @kitgary
    @kitgary 4 года назад

    Amazing! The image quality is even better than Zoom!

  • @christian-schubert
    @christian-schubert 4 года назад +3

    Love how he crams into a half-hour exercise what would be a whole course over on NetNinja's channel 😄

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

    Best intro ever

  • @radheafre8862
    @radheafre8862 4 года назад +8

    this apps works on just local machines. Can you guide to deploy and make it work on all machines?

    • @FatihErikci
      @FatihErikci 4 года назад

      you need to add STUN / TURN server

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

      I made some progress on this by setting my domain name to point to my routers public IP address. Then I have my router port forwarding port 8080 traffic to my computer behind the router. I also changed the port in the serve.js file to use port 8080. Now it all works if I use local host but when I access using my domain name I get redirected to the roomId but no video shows. Does it need another protocol open for the video traffic like UDP?

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

      @The Robotics Code Depot i also have the same quesion and you need an ssl certificate, otherwise it won't work and you can set up an ssl certificate verry easily trough cloudflare. and yea, you need to port forword the protocol UDP and TCP on the port that nodemon runs on, mine is 80👍👍

  • @hx_gt
    @hx_gt 4 года назад

    Good Video! A warning to Junior Devs. It only works well for peer to peer, If you do it with more users, your internet connection and those in the room will die.

  • @kanishkbharti8692
    @kanishkbharti8692 4 года назад +10

    JIO has already made an exact zoom clone 😂

    • @guidingtechbd
      @guidingtechbd 4 года назад

      App name?

    • @garvnanwani9835
      @garvnanwani9835 4 года назад

      @@guidingtechbd jio meet

    • @varunram5413
      @varunram5413 4 года назад

      Searched for this comment as soon as I read the video title lol

    • @garvnanwani9835
      @garvnanwani9835 4 года назад +1

      @Sentinel Jio is an Indian company that has even copied whatsapp theme for its jiochat app, I don't know why they are doing this but anyway

    • @varunram5413
      @varunram5413 4 года назад +1

      @@garvnanwani9835 Plot twist: Kyle works for Jio

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

    can you also make a video on how to host it on vercel or netlify

  • @austinfrbs
    @austinfrbs 4 года назад +6

    I'm having some trouble using it across devices, is there any chance of you doing a tutorial for deployment?

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

      Add the port number to the IP address generated by your router

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

      @@mosesatanda3530 can you explain this a bit more. Seems that a lot of people struggle with the deployment of this app. Me myself tried Heroku but that didn’t work...

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

    Thank you for video! Would be great to see a tutorial on deploying such projects and running them online. Maybe someone could suggest a good existing one?

  • @marcelopotty5218
    @marcelopotty5218 4 года назад +28

    So, if this is a peer-to-peer model, it means that each user streams its video to each other user?
    And if there are 10 users, each user would stream to 10 other users?
    That woudln't kill user's internet? 🤔

    • @MaulikParmar210
      @MaulikParmar210 4 года назад +7

      True, that's why commercial applications still exists which takes care of optimization. Peer to peer works as long as it doesnt scale out of peers capacity, other alternative model exists to adress these issues.

    • @arjunshinojiya7571
      @arjunshinojiya7571 4 года назад +2

      That's true,zoom is not using peer to peer

    • @MilanDrazic
      @MilanDrazic 4 года назад

      That wouldn't kill the user's internet? P2P is mama that's why zoom is shit

    • @Jorgeee
      @Jorgeee 4 года назад

      Milan Drazic p2p isn’t very secure since you can pull ips from connected people, also if someone has shit internet it can fuck up thr whole room

    • @MilanDrazic
      @MilanDrazic 4 года назад

      @@Jorgeee You can never hide an IP, you can only ensure that others cannot access the data through your IP
      P2P technology is like a branch. The more users branch off the source stream, the better the network and signal quality
      my opinion I came to

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

    You're a great teacher. I really enjoyed it and learned stuff. Thanks for putting this together.

  • @RNMERIA
    @RNMERIA 4 года назад +4

    Thanks Kyle, If you could assist in getting this hosted somewhere than it would be very helpful

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

    Thank you! I always love your video and appreciate your works!

  • @echo-ps9685
    @echo-ps9685 3 года назад +8

    a question, wouldn't this overload the user's internet as all of the users are sending their stream to many other users resulting in a redundant upload, and with each new user the upload will suffer even more ?

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

      Yes it will thats why big corporation have some kind of compression algorithm depending on the network ig.

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

      @@ashishmaurya3113 alternatively they don't use p2p, instead they reroute all the streams into an aggregator, which returns one stream that contains all the other streams.

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

      @@TheMasterAram I had no clue about that.

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

      @@TheMasterAram Do you have any reference link for this? I interested to check it out.

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

    Consider putting this in Docker, with a docker compose.

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

    This is awesome, thank you so much. Do you have any tutorials of now how to get this published to a live server so we can make it public?

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

      I made some progress on this by setting my domain name to point to my routers public IP address. Then I have my router port forwarding port 8080 traffic to my computer behind the router. I also changed the port in the serve.js file to use port 8080. Now it all works if I use local host but when I access using my domain name I get redirected to the roomId but no video shows. Does it need another protocol open for the video traffic like UDP?

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

      @@theroboticscodedepot7736 same here , did you solve it ?

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

      @@eraramchandra1338 - I had to abandon my efforts as other work took precedent.

  • @JamCluster
    @JamCluster 4 года назад

    Amazing Bro!! not as much people know about webrtc, great job!

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

      He doesn't either. Just using a high level library to do all the work

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

    Hey, won't this app break down/ not work when trying to connect accross different networks, as you're deploying without using STUN or TURN servers?

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

      Hey, do you know how to implement using STUN or TURN server?

  • @rockycool18
    @rockycool18 4 года назад +1

    Hey buddy you explain it the best way , would be nicer to know the security considerations and how this system will work in different network setups (like through NAT, firewall, proxies etc)

  • @qwertzu112sge
    @qwertzu112sge 4 года назад +5

    Hey Kyle, thanks for the great video!
    But I've got a problem now: Since just talking to myself on localhost is pretty cool for a while, I wantd to deploy it to my server, so I can talk to myself via my sever, so the rent for it pays off.
    But I cant get it to run. peerJS detects the client connection and disconnection, but i cant get to see a video. Ports 3000 and 3001 are open. Both Firefox and Chrome dont work.
    Do you know what might cause this problem? Do I have to open any more ports?

    • @VVldi
      @VVldi 4 года назад

      Same here, cant see video

    • @six1free
      @six1free 4 года назад +1

      I left instructions in a reply to my main comment... rather long, in short it needs to be SSL

    • @amruthap6334
      @amruthap6334 4 года назад +2

      i have tried and also downloaded your code but still the second user is not adding in the page. what should i do ???? PLease help. btw i m working on firefox. is that the problem ?????

    • @six1free
      @six1free 4 года назад

      @@amruthap6334 it should not be.. if you're using my code, describe the console output (F12)
      if you're only using my script.js that's why, it won't work with his server.js - too many additions, my server.js is in the same public folder, but you'll likely need to comment out the mysql blocks and modify the .ejs a little

    • @INDRESH_recreation
      @INDRESH_recreation 4 года назад +1

      @@amruthap6334 hey this is kiranmai we have the same problem too but we didn't understand what he said.if you got it please explain me.

  • @dasten123
    @dasten123 4 года назад

    It's insane how easy this is °__°

  • @prashoonbhattacharjee8211
    @prashoonbhattacharjee8211 4 года назад +8

    Can you also please show how to deploy this project to the web?

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

      I'd use nginx to proxy the requests to the node servers.

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

      @@CrysfelVilla why would you use nginx? wouldn't it work without it?

  • @rafaelgpontes
    @rafaelgpontes 4 года назад +5

    Hey, this was an amazing on-point tutorial. I had to remove the defer from for it to work here for me. It kept saying that io was not defined on my script.js file. I think "defer" introduces a race condition bug. If it happens to load before the script file, it works. Otherwise, an io not defined expetion is thrown.

    • @Genspirit45
      @Genspirit45 4 года назад

      You likely put your script.js above your socket.io script or did not defer your script.js.
      You typically want to defer any non-essential javascript as it will block loading the website if it runs right away causing it to load slower for the user.

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

      Thanks mate

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

    Thanks for the video. Too bad I didn't see it when it came out. Great explanation!

  • @sp--nt1gg
    @sp--nt1gg 4 года назад +4

    0:24 _proof you're _*_REAL_*_ Kyle_

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

    hi, you are a great teacher and explainer.

  • @sundeepamrutia
    @sundeepamrutia 4 года назад +3

    How can we host it? How many user can we expect to connect? Is it good for small business?

    • @shubhamsharma0099
      @shubhamsharma0099 4 года назад

      How can i host it on firebase that it will work on Realtime internet. Pls reply

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

    Amazing video. I am a bit confused though. Why we needed socketio? Couldn't peerjs library itself handle it all ? Or it was needed to manage rooms ?

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

    It's not working for me. When I join into the room from a different browser, that video is not being added to the previous browser window. I have tried coding myself and also cloning your git repo. Neither worked. Please help!

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

      You found the solution about that , i have the same problem

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

      @@marouaneaitbolbarod4807 I also have the same issue

  • @traveler292
    @traveler292 4 года назад

    Exactly what I’ve been looking for. Thanks man :)