how to build multi-user video chatting web app using webRTC, node.js and socket.io

前端 未结 4 1960
长情又很酷
长情又很酷 2021-02-09 18:05

im trying to make a web app that supports multi-user video chatting. ive read an article about webrtc on \"getting started with webrtc\" (http://www.html5rocks.com/en/tutorials

相关标签:
4条回答
  • 2021-02-09 18:24

    I looked at those protocols as well, not sure what node.js and sockets.io can do yet, but I think its a big mistake whatever they are doing, because all you need to do is create one place where multiple users will put their webcam images and then everybody could access the place separately to view all conversations. This has to be quick though because not a problem with video but if signal is slow then its not going to be understandable. I would try something else. I am wondering why they could not solve such an easy concept of multi-conferencing.

    I have created a parody of multi-chat on my website, I cannot show you right now, but basically I save frames every 5 seconds of video and then store them (overwrite) the image saved in central folder. When somebody logs in they see all the webcams online (done with PHP). I don't know if this helps but it works and it is similar.

    0 讨论(0)
  • 2021-02-09 18:31

    WebRTC is peer-to-peer protocol(browser-to-browser) without server,So you must know about my browser i must know about your browser means(your browser codec,public ip,port,etc) then only we can able to communicate,so we are using signalling(socket.io:web socket two way communication protocol send some information about my browser ,and receive some information about you browser ,with nodeJS server then peer connection will establish)

    Three user communication is also possible in WebRTC using mesh network,see you send some information to me (browser information) at a same time you send this same information to other peer,when i receive some information about your i will send some information about me to you and other peer,the same thing will happen in other peer also.

    Here some detail about mesh network http://en.wikipedia.org/wiki/Mesh_networking

    0 讨论(0)
  • 2021-02-09 18:32

    I would say that there are two separate things here. WebRTC needs signaling to setup the peer-to-peer communication between two nodes. I think you are on the right track when using Node.js and Socket.js for this.

    But it is not WebRTC (or socket.io) that decides if a third part can join the meeting, it is you that decides this. And this is the other part of the signaling that have little to do with WebRTC.

    This meens that you implement functionality like setting up meetingroom, discover available meetingrooms, joining meetingrooms etc. When the three part meeting is up and running, each node will have two peer connections, one to each of the other nodes.

    0 讨论(0)
  • 2021-02-09 18:45

    For N users, you need to use a media streamer like Kurento (http://www.kurento.org/)

    Then you can build your own multi users webrtc solution such as: https://webrtc-chat.com/ (built on top of Kurento)

    0 讨论(0)
提交回复
热议问题