'How to remove dependency on peerJs server when using with Twilio turn/stun servers

I am using twilio from peerjs in my application. I had assumed that this removed dependencies on the peerjs server; the peerjs server has gone away at present which highlighted a dependency. Is it possible / how to remove this dependency?

My code is:

peer = new Peer(myId, { secure: true, config: iceServers: [twilio servers] }

results in:-

peerjs.min.js:52 WebSocket connection to 'wss://0.peerjs.com/peerjs?key=peerjs'.... failed:

I see that the 'host' parameter for the new Peer() call defaults to 0.peerjs.com, is there a Twilio replacement for this?



Solution 1:[1]

You are using Twilio for STUN and TURN but that is not a drop-in replacement for the signaling server required by any WebRTC application. Hence peerjs will still attempt to connect to the "default" signaling server which is down per https://github.com/peers/peerjs/issues/937

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Philipp Hancke