简体   繁体   English

WebRTC需要特定的信令服务器软件吗?

[英]WebRTC Requires a Specific Signaling Server Software?

I know easyRTC and there is more software like that, I can install it on my VPS to accept WebRTC technology. 我知道easyRTC,并且有更多类似的软件,我可以将其安装在VPS上以接受WebRTC技术。

But do I really need it? 但是我真的需要吗?

I am still learning... 我仍在学习...

I have virtual shared hosting server, that has node.js installed and I can use it on my control panel and also use some port forwarding and WebSockets. 我有一个虚拟共享托管服务器,该服务器安装了node.js,可以在控制面板上使用它,还可以使用一些端口转发和WebSockets。

Is it possible to make signaling server with this shared hosting server for WebRTC video calls, chat rooms or should I stop wasting my time with this. 是否可以使用此共享托管服务器来制作信号服务器以进行WebRTC视频通话,聊天室,或者我该停止浪费时间了。 (Like upload and run it with node.js etc.) (就像上传并使用node.js等运行它一样)

Thanks 谢谢

Basically yes - you can use your own server's websockets for signalling. 基本上可以-您可以使用自己服务器的websocket发出信号。 The simplest would be: 最简单的是:

socket.on('message', function(msg){
  io.to('roomid, socketid etc').emit('message', msg); // here you send msg to other user / users
});

But the harder (comparing to libraries like easyRTC) thing starts when you want to use it on frontend. 但是,当您想在前端使用它时,较难的事情(与easyRTC之类的库相比)就开始了。 But here you can find some nice examples depending on what you need to do. 但是在这里,您可以根据需要找到一些不错的示例。

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

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