WebRTC Debug Playbook
created: 2026-03-08T22:50:00+08:00updated: 2026-03-08T22:50:00+08:00topic: programming/webrtcstatus: evergreen#webrtc#debug#coturn#pion#tailscale
WebRTC Debug Playbook
Browser-Side Checks
- Inspect
iceGatheringState,iceConnectionState,connectionState. - Confirm candidates include expected types (
host/srflx/relay). - Validate end-of-candidates events and renegotiation behavior.
TURN Validation
- Use Trickle ICE sample page to test STUN/TURN config quickly.
- Verify coturn auth mode, realm, and relay port ranges.
Runtime Observability
- Capture periodic
getStatssnapshots: RTT, jitter, packetsLost, bitrate, frame drop. - Build threshold-based alerts for degraded sessions.
Tailscale-Like Network Diagnostics
- Check whether route is direct or relay.
- Confirm NAT properties before deep protocol debugging.
References
- Trickle ICE sample: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
- webrtc.org testing: https://webrtc.org/getting-started/testing
- coturn turnserver options: https://github.com/coturn/coturn/wiki/turnserver
- Pion debug notes: https://github.com/pion/webrtc/wiki/Debugging-WebRTC
- Tailscale connectivity: https://tailscale.com/docs/reference/device-connectivity