Menu

1 / 2

Stream a Screen or Camera to Web Browsers over WebRTC from C#, with No Media Server — and Publish with WHIP

DEV Community: dotnet·Roman Miniailov (VisioForge)·6 days ago
#NGhoGElH
#devtodotnet#devto#dev#pipeline#viewer
Long article (1618 words) — no AI summary yet.
Reading 0:00
15s threshold

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…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.