Overview

The realtime service supports WebRTC signaling for peer-to-peer connections. This enables features like video/audio calls and screen sharing.

Signaling Flow

Message Types

Offer

Send a WebRTC offer to a user:

Answer

Send a WebRTC answer in response:

ICE Candidate

Exchange ICE candidates:

Complete Example

WebRTC signaling is a lower-level feature. For production use, consider using the SDK’s signaling helpers when available.

Best Practices

STUN/TURN

Configure proper STUN/TURN servers for NAT traversal.

Error Handling

Handle connection failures and fallbacks gracefully.

Permissions

Request media permissions before starting calls.

Clean Up

Always close peer connections when done.

Next Steps

Messaging

Real-time messaging

Presence

Presence system

Overview

WebSocket overview

SDK

Use the SDK