DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Firefox WebRTC: Screen Sharing, IP Leaks, and Developer Diagnostics

Firefox has comprehensive WebRTC support — and some specific settings and behaviors that matter for developers building real-time applications.

What WebRTC Enables

WebRTC (Web Real-Time Communication) is the browser API that powers:

  • Video calls (Google Meet, Jitsi, Whereby, etc.)
  • Voice calls
  • P2P file sharing
  • Screen sharing
  • Browser-based game multiplayer

It lets browsers communicate directly (peer-to-peer) without a central server for media, though a signaling server coordinates the initial connection.

Screen Sharing in Firefox

Firefox's screen sharing uses the XDG Desktop Portal on Linux (for Wayland) and native APIs on Windows/macOS.

On Wayland: Requires xdg-desktop-portal and an appropriate backend:

  • GNOME: xdg-desktop-portal-gnome
  • KDE: xdg-desktop-portal-kde
  • Sway/Hyprland: xdg-desktop-portal-wlr or xdg-desktop-portal-hyprland

The portal provides a picker UI (select which screen/window to share). Chrome/Chromium uses a similar approach on Wayland.

Testing screen sharing permissions:

// In browser console:
navigator.mediaDevices.getDisplayMedia({ video: true })
  .then(stream => console.log('Got stream', stream))
  .catch(err => console.error('Failed', err));
Enter fullscreen mode Exit fullscreen mode

IP Address Leaks (WebRTC Leak)

WebRTC can expose your local IP address even when using a VPN. The browser discovers IP candidates during ICE negotiation, which can include your actual LAN IP and in some cases your real public IP.

Fix in Firefox:

  • about:config → media.peerconnection.enabled = false — completely disables WebRTC (breaks video calls)
  • Or use about:config → media.peerconnection.ice.default_address_only = true — only the ICE candidate from the default route (less aggressive, might still work for calls)
  • Or media.peerconnection.ice.no_host = true — suppresses local LAN IP candidates

For VPN users who want both privacy and functioning video calls: ice.no_host = true is the right balance.

Test if you have a leak: Search "WebRTC leak test" — multiple sites check what IPs your browser exposes.

TURN Server Configuration

For applications that need to traverse restrictive firewalls, WebRTC uses TURN (Traversal Using Relays around NAT) servers. Firefox supports TURN over:

  • UDP (standard)
  • TCP
  • TLS (encrypted TURN)

In Firefox DevTools (Network tab), you can see the ICE candidate negotiation in WebSocket or signaling messages.

Codec Support

Firefox supports:

  • Video: VP8, VP9, H.264 (software decode, hardware decode where available), AV1
  • Audio: Opus (primary), G.711, G.722

H.264 requires a system codec or the bundled OpenH264 (Cisco's open H.264 implementation that Firefox ships). On Linux, H.264 hardware decode via VA-API also works with the appropriate setup.

VP9 is Firefox's preferred codec — good quality at lower bitrate.

Checking codec support:

RTCPeerConnection.getCapabilities('video')
  .codecs.forEach(c => console.log(c.mimeType));
Enter fullscreen mode Exit fullscreen mode

Device Permissions (Camera/Microphone)

Firefox tracks per-site camera/microphone permissions:

  • First time a site requests: Firefox shows a permission dialog
  • Granted permission: stored and not prompted again (for that origin)
  • Manage all permissions: Settings → Privacy & Security → Permissions → Camera (or Microphone) → Manage

Temporary permission: You can grant permission for a session only — Firefox asks again next time.

From address bar: Click the camera/microphone icon in the address bar to review and revoke permissions for the current site.

Debugging WebRTC in Firefox

about:webrtc — The WebRTC diagnostic page. Shows:

  • Active peer connections
  • ICE candidates gathered
  • DTLS certificate info
  • Statistics (bitrate, packet loss, jitter)

This is the equivalent of Chrome's chrome://webrtc-internals. Useful for diagnosing why a video call is poor quality.

For developers, you can also inspect the signaling exchange in DevTools → Network tab (filter by WS for WebSocket if you're using WebSocket-based signaling).

Privacy Settings Summary

Setting Effect Recommendation
media.peerconnection.enabled = false Disables all WebRTC Use only if you don't do video calls
media.peerconnection.ice.no_host = true Hides LAN IPs Good default for VPN users
media.peerconnection.ice.default_address_only = true Only expose default route IP Balance of privacy + functionality

For most users, WebRTC works transparently. If you use a VPN and care about IP leaks, ice.no_host = true is worth enabling. For developers building WebRTC applications, about:webrtc is an underused diagnostic tool.

Top comments (0)