简体   繁体   English

用于聊天的协议是什么? webRTC或Websockets

[英]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. 我目前正在使用Websockets进行文本聊天。 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. 我应该为所有这些使用Websockets,还是为视频和音频使用webRTC,为文本聊天使用Websockets。 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. 我可以做到这两点,并且不想为webRTC重写我的文本聊天,但如果它是更好的选择,那么我会。
EDIT: I've just found out about binaryJS, Is this a better and easier alternative to webRTC? 编辑:我刚刚发现了关于binaryJS,这是一个更好,更容易的webRTC替代方案吗?
Thanks, 谢谢,
@_C1D @ _C1D

By embedding your video and audio streams in websockets, you'll have a simpler system but everything will have to pass through your server. 通过在websockets中嵌入视频和音频流,您将拥有一个更简单的系统,但所有内容都必须通过您的服务器。

WebRTC allows for a direct connection between pairs, so you'd get much better results using it. WebRTC允许对之间的直接连接,因此使用它可以获得更好的结果。

Note also, but you probably know it already, that everything webRTC is just emerging. 另请注意,但您可能已经知道,所有webRTC都刚刚出现。

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. 关于编辑中的问题,关于binaryJS:我从未尝试过,但它看起来不像是一个交易更换者,只是一个使用websockets的工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM