Loading...
const pc = new RTCPeerConnection({
iceServers: [{ urls: 'stun:stun.example.com:3478' }],
});const pc = new RTCPeerConnection({
iceServers: [
{ urls: 'stun:stun.example.com:3478' },
{
urls: 'turns:turn.example.com:443?transport=tcp',
username: creds.username,
credential: creds.credential,
},
],
});A TURN server with short-lived credentials from your backend lets calls connect even behind strict firewalls.
Yes. Encryption is mandatory: media uses SRTP and data channels use DTLS, so unencrypted WebRTC is not possible.
WebSocket connects a client to a server over TCP. WebRTC connects devices directly, mostly over UDP, and handles audio, video and data.
Yes. RTCDataChannel sends arbitrary data between peers, with reliable or unreliable delivery.