Zmh's blog

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 getStats snapshots: 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

On this page