-
-
Notifications
You must be signed in to change notification settings - Fork 55
Home
WebRTC for .NET, with one API across five platforms.
Every platform has its own WebRTC SDK, and no two of them look alike: a Java SDK on Android, an Objective-C framework on Apple, a C++ library on Windows, and the browser's own JavaScript API on the web. Writing a call app for all of them normally means four codebases and four skill sets.
WebRTCme maps all of them onto a single C# surface that mirrors the
W3C WebRTC 1.0 API — the same specification browsers implement.
If you have used RTCPeerConnection in JavaScript you already know this API: the same names, the
same objects, the same events, in C# casing.
var window = CrossWebRtc.Current.Window();
var pc = window.RTCPeerConnection(new RTCConfiguration { IceServers = [] });
var offer = await pc.CreateOffer();That runs unchanged on Blazor WebAssembly, Android, iOS, Mac Catalyst and Windows.
flowchart TB
app["<b>Your app</b><br/>Blazor WebAssembly · .NET MAUI"]
subgraph P2["package 2 — WebRTCme.Middleware"]
direction LR
mw["<b>Middleware</b><br/>video tile<br/>media, data and recorder managers<br/>view models"]
conn["<b>Connection</b><br/>Signaling — mesh / peer-to-peer<br/>MediaSoup — SFU"]
mw --- conn
end
subgraph P1["package 1 — WebRTCme"]
direction LR
api["<b>The unified API</b><br/>IWindow · RTCPeerConnection<br/>IMediaDevices · IMediaStream"]
bind["<b>Bindings</b><br/>Blazor · Android · iOS<br/>Mac Catalyst · Windows"]
api --- bind
end
nat["<b>Native WebRTC</b> — built by WebRTCnative<br/>libwebrtc.aar · WebRTC.xcframework · WebRTC.framework · WebRtcInterop.dll<br/>or, on Blazor, the browser's own WebRTC"]
app ==> P2
P2 ==> P1
P1 ==> nat
app -. "or use the API directly" .-> P1
Two packages, and which one you want depends on how much you want built for you:
| what you get | when | |
|---|---|---|
WebRTCme |
The unified API and all five bindings, with their native halves. Peer connections, media streams, devices, data channels. | You have your own signalling, your own UI, or you are building a library. |
WebRTCme.Middleware |
The above, plus a video tile, media managers, view models, and a connection layer that does the signalling for you — peer-to-peer or through a mediasoup SFU. | You want a working call app without writing the plumbing. |
WebRTCme.Middleware depends on WebRTCme, so referencing the middleware brings both. You never
reference a binding directly.
| Page | What it covers |
|---|---|
| Getting started | Installing the packages and wiring them into a Blazor or MAUI app |
| Hello world | Sixty lines that negotiate a real connection — no server, no camera, no network |
| Platform prerequisites | Read this before you file a bug. Three traps, each of which fails silently |
| The unified API | The WebRTCme package: how the W3C surface maps to C# |
| Middleware | The video tile, the managers, the view models |
| Connection | Choosing between peer-to-peer and an SFU, and what each needs from you |
| Demo apps | The two sample apps in the repository, and how to run them |
| What works where | Honest per-platform feature matrix, including what is unverified |
| Releases | Versions, upgrading, what is embedded, attribution |
| Testing | How every claim on this wiki is checked |
| Troubleshooting | Symptoms, and what actually causes them |
| Target framework | Minimum | WebRTC comes from | |
|---|---|---|---|
| Blazor WebAssembly | net10.0 |
— | the browser |
| Android | net10.0-android |
API 28 (Android 9) | libwebrtc.aar |
| iOS | net10.0-ios |
iOS 15.0 | WebRTC.xcframework |
| Mac Catalyst | net10.0-maccatalyst |
macOS 12 | WebRTC.framework |
| Windows | net10.0-windows10.0.22621.0 |
Windows 10 22H2 (22621) | WebRtcInterop.dll |
Both packages carry all five slices, so you reference the same package whatever you are building and NuGet picks the one that matches.
Blazor Server and Blazor Hybrid are not supported. Only WebAssembly. Blazor Hybrid is #28.
.NET 10 only. The 2.0.0 line is .NET 8 and is frozen — there is no back-port. See Releases.
Building Google's WebRTC needs depot_tools, a ~30 GB checkout and an hour on a machine with the
right platform SDK. None of that belongs in an application repository, so it is not in this one.
WebRTCnative builds the native libraries on
GitHub's runners and publishes them as artifacts; WebRTCme consumes the results. Its
wiki covers the build, the branch policy and the
C ABI that the Windows binding calls through.
The framework is in active development on master, targeting .NET 10. Current release is
26.9.21. What has and has not been verified on each platform is written down rather than
implied — What works where is the short version, and doc/KnownGaps.md in the
repository is the long one.
Start here
The stack
- WebRTCnative
- Bindings
- The unified API
- Middleware
- Connection
- · Signaling (mesh)
- · MediaSoup (SFU)
- Demo apps
Reference
When it breaks