Search code examples
websocketwebrtcratchetpeerjsvideo-conferencing

Websocket peerjs video conference


I am making a video conference using webrtc and/or peerjs and i am new to this. I am using socketo.me as webrtc and the concept is it is like meet.google.com

I want to ask you guys something:

  1. Do I need to use php websocket even though i am already using peerjs?
  2. What is the flow of this project? Do i use websocket to restore the socketid and use it to the users and use peerjs to call the other user?
  3. If you have a scratch can i see it?
  4. This is the sample that i worked out and the problem is in the picture too:
    https://i.sstatic.net/jftev.png

If I have wrong question please correct me and enlighten me on how to do this project thank you very much!


Solution

  • From experience I would not recommend using Peerjs, it is incompatible in some cases with cross browsers and usually gives irreparable errors which means that it is not the best option.

    If you want something like Google Meet I would recommend 2 options:

    1- https://github.com/livekit/livekit-server

    2- https://github.com/muaz-khan/RTCMultiConnection (This second one is more basic to use)

    Of the two options, the better one is LiveKit, scalable, without errors between browsers, several SDK clients and examples in: Android, ReactNative, Flutter, Javascript, Etc.

    I hope I've helped.