3 ms·
They aren't mutually exclusive, nor do they serve the same purpose, but there are still advantages to WebRTC over websockets for some applications. First, I da
by trey-jones 12y ago
They aren't mutually exclusive, nor do they serve the same purpose, but there are still advantages to WebRTC over websockets for some applications.
First, I dare to say that most WebRTC apps use websockets for signaling (to initialize the p2p connection). So it makes sense to use the two different technologies together.
Second, notice that the connection is peer to peer - no video data passes through your server, which saves you bandwidth and cpu cycles. This is the coolest thing about WebRTC. Even though you have to maintain websocket (or long polling, etc) connections on your server for each user, none of the data transmitted between peers will cost you anything.
In short - WebRTC is good for somethings, other things will be fine using only websocket.