Skip to content

WebRTC test

This WebRTC/WHEP viewer is adapted (for Astro) from the source of MediaMTX.

  • While WHEP signaling (HTTP) happens over a Cloudflare tunnel (cam-rtc.ohn.sh), the media stream itself is transmitted directly from mediamtx on my home network to the browser.
  • The latency is incredibly low compared to HLS from the same mediamtx server. That’s the whole point of WebRTC, but it’s still impressive.
  • Encapsulate in Lit (or plain web) component.
  • Try other WebRTC libraries (the MediaMTX implementation has quite a bit of codec-related complexity that’s probably unnecessary for this demo).