The relationship between Janus Gateway and Baidu WebRTC (libwebrtc) is subtle but important. Here’s a breakdown:
Janus Gateway | Baidu WebRTC (libwebrtc) | |
---|---|---|
What it is | A media server for WebRTC (written in C) | The WebRTC implementation used in browsers (C++) |
Role | Server-side handler for WebRTC sessions, SFU | Client-side WebRTC stack (browsers, mobile SDKs) |
Uses libwebrtc? | ❌ No, it does not use Baidu’s libwebrtc | ✅ Yes, used in Chrome, Firefox, Android, etc. |
Language | Written in C (not C++) | Written in C++, designed for browsers & apps |
Focus | Routing, mixing, recording, plugins | PeerConnection, ICE, DTLS, codecs |
When you use Janus Gateway with a browser:
The browser side uses Baidu’s libwebrtc
under the hood to handle:
The Janus server:
Even though Janus doesn’t use libwebrtc
, it implements the WebRTC protocol stack on the server side — in its own way, written from scratch in C.
libwebrtc
Janus authors chose not to use Baidu’s libwebrtc
because:
libwebrtc
libwebrtc
to talk WebRTC protocolsIf you’re building with WebRTC in the browser and using Janus, you’re bridging Baidu’s libwebrtc (browser) to Janus (server) over standard protocols.