Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Protocol to use for chat? webRTC or Websockets

I'm creating a Chat site that will be able to do, Video, Audio and Text Chatting. I'm currently using Websockets for Text Chatting. I need to know what is best at Video, Audio and Text Chatting. Which one is more effiecint. Should I use Websockets for all of them or webRTC for Video and Audio and Websockets for Text Chat. I can do both and wouldn't like to have to re-write my text chat for webRTC but if it is a better option then I will.
EDIT: I've just found out about binaryJS, Is this a better and easier alternative to webRTC?
Thanks,
@_C1D

like image 321
C1D Avatar asked Mar 29 '13 14:03

C1D


1 Answers

By embedding your video and audio streams in websockets, you'll have a simpler system but everything will have to pass through your server.

WebRTC allows for a direct connection between pairs, so you'd get much better results using it.

Note also, but you probably know it already, that everything webRTC is just emerging.

Regarding the question in edit, about binaryJS : I never tried that but it doesn't look like a deal changer, just a facility for using websockets.

like image 198
Denys Séguret Avatar answered Oct 17 '22 12:10

Denys Séguret