简体   繁体   中英

Signaling channel on WebRTC

I am aiming to create a WebRTC chat (video/audio) application and most of tutorials and demos that I see are using the following signaling channel:

signaling.simplewebrtc.com:8888

I even found this great demo, where the developer stated that it does not depend on this signaling channel, but when I went through the code I found it there.

Can someone explain me, how can I substitute this with my own signaling channel?

I do not completely understand your question. I guess the URL you provided points to an websocket server. Websockets are often used for signaling because they provide a permanent, full-duplex connection (this means that the server is able to push messages to the client without an previous request).

You have to exchange network information between the two parties who want to set up an RTCPeerConnection because of NAT and firewalls etc... How to exchange that information is not part of the WebRTC-specification. You can use any protocol you want, HTTP,Websockets, even EMail (but that would be pretty ugly to implement :) ). But if you want to build your own signaling-server using node.js you can have a look at the tutorial I am currently writing. It explains in detail how to setup your own very simple video-chat using WebRTC and a Node-Server hosted on uberspace.de:

Tutorial: Create your own Videochat-Application with HTML and JavaScript

If you use my tutorial it would be great if you could tell me if it is understandable.

Edit: As I am still getting requests for this old tutorial, please use an up to date one like those: https://www.baeldung.com/webrtc

https://www.html5rocks.com/en/tutorials/webrtc/basics/

Please take a look at this excellent blog on the signaling options that are available for WebRTC.

I have listed a few important blogs and sample WebRTC applications that you might also want to review to help you build your chat application.

  1. I installed nodejs from Install NodeJS along with the required dependencies at signalmaster
  2. Ran node server.js in cmd. And server started running.

  3. PS: Change url option present in simplewebrtc.bundle.js

Let me know if you face any problem

I wonder why no one has mentioned this so far . You can also use the sip framework based webrtc libraries and clients such as sipml5 , jssip etc . Additionally since you mentioned you would like your own server setup to cater to signalling requests , you will have a wide variety of websockets based sip servers to choose from such as officesip , kamailio , mobicents etc .

您可以在https://code.google.com/p/sipservlets/wiki/HTML5WebRTCVideoApplication尝试修改 Mobicents 附带的最新应用程序,它允许您进行聊天和视频聊天。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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