Nutritioustim
Nutritioustim

Reputation: 2738

Howto make SimpleWebRTC Directly Connect to my Websocket URL

By default, SimpleWebRTC uses https://sandbox.simplewebrtc.com:443/ as its signaling server. Now, this is an XHR endpoint, and somehow, signal master seems to switch it to a web socket connection.

Now, I’m trying to use my own signaling server with SimpleWebRTC. And it’s a straightforward websocket endpoint. So when creating the SimpleWebRTC object, I have SimpleWebRTC { “url” : ”ws://<my-IP>/chatroom" ...}

But upon creating the SimpleWebRTC object, it proceeds to try and connect to a different URI: http://my-IP/socket.io/?EIO=3&transport=polling&t=1450985796761-0.

How can I get SimpleWebRTC to just connect directly to ws://my-IP/chatroom, and have those parameters just passed along to other peers as signal master does? Does my signaling server have to do anything other than pass along the parameters / message that the initiator sends?

Upvotes: 1

Views: 2373

Answers (2)

nobjta_9x_tq
nobjta_9x_tq

Reputation: 1241

Here is signal master for your question: github signalmaster

For run it, you must to install module of npm in server.js file. Replace:

https://sandbox.simplewebrtc.com:443/ 
↓
http://<yourip>:8888/

But I don't understand, if we using that signal server, can we increase performance of frame rate and speed, and no need stun and turn server of google? When I deployed that signalserver on my cloud host? BTW, I can't understand when reading config for install turnserver on github.

Upvotes: 0

Philipp Hancke
Philipp Hancke

Reputation: 17350

SimpleWebRTC uses socket.io instead of raw websockets. If you want to use raw websockets you can try replacing https://github.com/andyet/SimpleWebRTC/blob/master/socketioconnection.js with your raw websocket connection.

Or you implement the socket.io protocol in your server.

Upvotes: 1

Related Questions