webrtc hands-on (React hooks)

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • I had prepared this video to upload to Udemy but I then changed my mind and decided to share it on CZcams.
    It is almost similar to my other WevRTC-React video series but in this video I use React hooks instead and covers up to Signaling server.
    I hope this helps.

Komentáře • 68

  • @andrewndotela7407
    @andrewndotela7407 Před 2 lety +6

    First of all thanks again for this knowledge contribution to the community... I personally benefits a lot,

    • @amireshaq
      @amireshaq  Před 2 lety +4

      I am happy to hear that. Thanks

  • @adrianriedel5954
    @adrianriedel5954 Před rokem +1

    If you get an error like "ICE failed, add a TURN server and see about:webrtc for more details" you have to add the candidates right after you set remote description.
    At least that's what happened to me and how i fixed it.
    This method works best if have already set up the socket-server (finished at 48:31) and just put addCandidate() at the end of setRemoteDescription().
    Tank you very much for your video, I finally understood how WebRTC works and was able to build it my own. I love that you stay basic and don't use libaries (like simple-peer) or some fancy styled components.

  • @thefuntech2810
    @thefuntech2810 Před 2 lety +2

    Thankyou Sir for creating this wonderfull Lesson on webRTC .

  • @SSango-hk9sm
    @SSango-hk9sm Před 2 lety +2

    Your explanations are on point. Thank you.

  • @6ocram
    @6ocram Před 7 měsíci

    Thank you very much, I learned a lot. You explain really well.

  • @AnjaliKumari-bs9oo
    @AnjaliKumari-bs9oo Před 2 lety +1

    Thanks a lot Sir. You made my day. Really nice explanation and hands on code.

    • @amireshaq
      @amireshaq  Před 2 lety

      I am glad you found it useful. I hope to the next part soon.

    • @AnjaliKumari-bs9oo
      @AnjaliKumari-bs9oo Před 2 lety +1

      @@amireshaq I was stuck with this thing for 2 weeks but yesterday I made it with help of your video. Waiting for your next video. Thanks

    • @amireshaq
      @amireshaq  Před 2 lety

      ​Hi @@AnjaliKumari-bs9oo, I am glad it helped. I was not going to continue on this series because the rest is covered in the other webRTC series. I just wanted to kind implement it with Hooks. Once you understand then the rest is in the other videos. Hope that helps.

  • @BioxyTube
    @BioxyTube Před 2 lety +1

    I haven't finished to watch but ....SUBSCRIBED big time !! thanks for this clear tutorial

    • @amireshaq
      @amireshaq  Před 2 lety

      Thanks Lou H

    • @SACKO0731
      @SACKO0731 Před rokem +1

      @@amireshaq Can this be done on react-native mobile application, or is there any other ways to solve it, mobile devices can't pass the "getUserMedia" objects. Thanks just sub

    • @amireshaq
      @amireshaq  Před rokem

      Hi @@SACKO0731, yeah it can, have a look at the other webrtc series I have done, includes RN too.

    • @amireshaq
      @amireshaq  Před rokem +1

      ​ @NTINU NSAKU NE KONGO ​, check czcams.com/video/uR_92JkSezA/video.html and czcams.com/video/yj2pETkKWC8/video.html

    • @SACKO0731
      @SACKO0731 Před rokem +1

      @@amireshaq thank you very much, be blessed brother

  • @laithsaleem580
    @laithsaleem580 Před 10 měsíci

    that is very smooth thanks for the awesome lesson !!

  • @shahemhaddad2717
    @shahemhaddad2717 Před 2 lety +1

    So much informative! thanks a ton!

  • @elhadede6
    @elhadede6 Před 2 lety +2

    may god bless you

    • @amireshaq
      @amireshaq  Před 2 lety +1

      May God bless you too, Amin! Thanks

  • @saoussenslii
    @saoussenslii Před 2 lety +1

    thank you for this wonderful tutorial

    • @amireshaq
      @amireshaq  Před 2 lety

      I am elated

    • @saoussenslii
      @saoussenslii Před 2 lety

      @@amireshaq do you know if we can crop a webrtc stream from x start position to x end position? I need this in my project please

    • @amireshaq
      @amireshaq  Před 2 lety +1

      @@saoussenslii as you may know, the media when transported between peers is encrypted. So, you would have to do it before the encryption, say for instance display and crop the video using a canvas object. you may also want to look at Offscreen canvas. check this video out: czcams.com/video/tmTt8XjAU9E/video.html

    • @saoussenslii
      @saoussenslii Před 2 lety +1

      @@amireshaq thank you so much for your response

  • @abdullahaboayesha
    @abdullahaboayesha Před rokem +2

    May Allah reward you for sharing beneficial knowledge with world. Would love to have consulting session with you , is that viable ?

    • @amireshaq
      @amireshaq  Před rokem +1

      Amin. It's easier to connect via LinkedIn, I use the same name as my CZcams Channel. Thanks

  • @jamalhassouni
    @jamalhassouni Před 2 lety +1

    Thank you sir 😊

  • @user-dg9sm7tv9l
    @user-dg9sm7tv9l Před rokem +1

    Hello, thank you very much for this valuable video, a question, when I answer the call I get the following error
    Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable
    could you help me?

    • @amireshaq
      @amireshaq  Před rokem +3

      This simply means that you have moved to another step in the process before the previous one finishing; e.g. you create an offer => wait for offer sdp and then setLocalDescription => send to peer who will first add to setRemoteDescription then do the same when creating an Answer SDP, setLocalDescription and send the SDP to the offerer who will setRemoteDescription. These steps must not jump to the next before the current one completing/returning. I hope I make sense.
      You may be missing an await; createOffer and createAnswer return a promise which you must wait for them to return with an SDP.

    • @Krishna_Bansal
      @Krishna_Bansal Před 6 měsíci

      hey , what's was the solution ? I am still facing the same issue inspite checking all the mandotrary steps

  • @toshvelaga
    @toshvelaga Před 2 lety +1

    Great video! Was wondering if there was a github repo for this video?

  • @worldhack.1201
    @worldhack.1201 Před rokem +1

    Thank you thank you ❤

  • @yogeshsirsat
    @yogeshsirsat Před rokem

    Great explanation!!

  • @huuvo272
    @huuvo272 Před 2 lety +1

    great, thank you

  • @kevinz1991
    @kevinz1991 Před 10 měsíci +1

    Thank you!

  • @shanjidhasan4515
    @shanjidhasan4515 Před 2 lety +1

    SIr, will you please make a tutorial for many to many conference without using any media server. I mean only by using webrtc.

    • @amireshaq
      @amireshaq  Před 2 lety +1

      I think I covered that in the other webrtc series

  • @dota2content755
    @dota2content755 Před rokem

    It doesn't work I set up the signalling server the sdp details were received but I wasn't able to set them up to the local Description etc

    • @amireshaq
      @amireshaq  Před rokem

      so you mean you get SDP after createOffer/createAnswer?

  • @volodymyrsypko9729
    @volodymyrsypko9729 Před 2 lety +1

    Hi Amir. Could you please advise what I need to do or which mediaserver has to be used for an audio (only!) multiuser chat where will be many-to-many connections? I expect up to 11 users in chat simultaneously. Thanks anyway.

    • @amireshaq
      @amireshaq  Před rokem +1

      Hi, have you looked at mediasoup? with mediasoup, you have to write your own code - its available as a node moduel

  • @freeman2340
    @freeman2340 Před 7 měsíci

    Thanks a lot! Could you share code please?

  • @mdx9520
    @mdx9520 Před 3 měsíci

    I am facing issue with proxy address which you set in pakage.json file to remove 404 error BUT i am, still facing the error

    • @amireshaq
      @amireshaq  Před 3 měsíci

      let me review the code again to understand your issue.

    • @mdx9520
      @mdx9520 Před 3 měsíci

      @@amireshaq there is some sort of url blocked by cors..

  • @zayhalo3964
    @zayhalo3964 Před 2 lety

    Is there a way I can just copy and paste the code to function in the particular areas on my website with the functions set to operate my backend components.

    • @amireshaq
      @amireshaq  Před 2 lety

      I dont think it is easy to answer because depending on the generated front-end code, you may have to rewrite some parts of the code to function properly.

  • @worldhack.1201
    @worldhack.1201 Před rokem

    Please create remaining part of this series I mean multi peer connections using react hooks kindly

    • @amireshaq
      @amireshaq  Před rokem

      I wish I had a lot of time, I'd love to do this stuff

  • @aliezadkhaha9439
    @aliezadkhaha9439 Před rokem

    Connection is working local, but it is not working by publishing in the internet

    • @amireshaq
      @amireshaq  Před rokem

      Hi Ali, are you deploying to a FQDN with HTTPS?

  • @zayhalo3964
    @zayhalo3964 Před 2 lety

    I need help. I already created my website. The code for my website was automatically generated for me I just need to know how I can enter the code you have enter to for the functions of my backend and for the areas I have designated for RTC

    • @amireshaq
      @amireshaq  Před 2 lety +1

      Hi Zey, I am not sure I understand - what is important really is to understand the concept and then be able to adopt in your own solution.

  • @kevinz1991
    @kevinz1991 Před 10 měsíci

    Code?

  • @dota2content755
    @dota2content755 Před rokem

    youre not using a stun server that is gonna create ICE agents for you

    • @amireshaq
      @amireshaq  Před rokem

      on LAN you dont need - if I understand your issue

  • @tonygeorge7482
    @tonygeorge7482 Před 2 lety

    what is the use of janus webrtc in these cases..?

    • @amireshaq
      @amireshaq  Před 2 lety +1

      with webrtc, you achieve direct one-to-one or more than two participants secure audio/video communication; however it may work well up to 3 or 4 participants after which call quality may start to degrade. If you are lucky this may work without the need for a TURN server. If you intend to support larger groups of participants, then you need communication servers like Janus, mediasoup, etc. as your Selective Forwarding Units (SFUs) - this means that now all media from/to each participant flows to/from the SFU.

    • @tonygeorge7482
      @tonygeorge7482 Před 2 lety +2

      @@amireshaq thanks for your replay can you make one video about janus

  • @lukaakhalbedashvili7167

    can u publish source code ?

  • @sonnyjordan6554
    @sonnyjordan6554 Před 2 lety

    Hi Amir.
    Is it possible to get in contact with you some how ?

    • @amireshaq
      @amireshaq  Před 2 lety

      Hi Sonny, you can search my name up on LinkedIn.

  • @pujanshrestha5900
    @pujanshrestha5900 Před 2 lety

    will it work on different network?

    • @amireshaq
      @amireshaq  Před 2 lety

      I did not go further in this tutorial but if you look at the other videos from part 1 - 7, you can access fro different networks. In certain situations you may have to use a TURN server

    • @amireshaq
      @amireshaq  Před rokem +1

      @@neb542 yes, I have configured coturn for my own use as a docker container;