iamDecode / proximity-chat

Proximity video chat for social events, similar to SpatialChat 🍻
Other
8 stars 0 forks source link

Replace peer.js with mediasoup #24

Closed iamDecode closed 3 years ago

iamDecode commented 3 years ago

Even though I really liked the concept of decentralised communication, we were running in a couple of issues where some users would show up to some, but not all users. Certain users were not able to share their video at all. Also, peer.js seems to have a rather excessive impact on performance.

This is quite a large change, moving away from peer.js and instead using mediasoup. The most important difference is the change from a mesh topology (peer.js) to a SFU (Selective Forwarding Unit) architecture. This is much more scalable, and offloads a bunch of connections and logic from the client to a central server. Mediasoup seems quite mature and reliable, and supports Simulcast and SVC as well.

Resources: https://bloggeek.me/webrtc-multiparty-architectures/ https://bloggeek.me/webrtc-multiparty-video-alternatives/