You want people to watch a live screen, one application window or a camera from your .NET application — and all they have is a web browser. The usual answers are HLS (several seconds behind), a screen-sharing service, or a media server you install and run next to the app.
This post shows two shorter routes, both with sub-second latency:
Straight to the browsers, no server. The .NET application serves the viewer page, runs the WebRTC signalling and sends every viewer its own stream.
Through a media server, with WHIP. The application encodes once and publishes the stream to MediaMTX, Janus or Cloudflare Stream over WHIP (WebRTC-HTTP Ingestion Protocol); the server delivers it to any number of viewers, on the internet as well.
screen / window / camera + microphone | [ your .NET application ] |-- WebRTCSinkBlock --WebRTC, VP8 + Opus--> browsers on your network '-- WHIPSinkBlock --WHIP, H.264 + Opus--> MediaMTX / Janus --WHEP--> browsers anywhere
Enter fullscreen mode
Exit fullscreen mode
The code uses…