File: janus_interface_and_replacement.md

package info (click to toggle)
rtpengine 13.5.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,676 kB
  • sloc: ansic: 86,764; perl: 59,422; python: 3,193; sh: 1,030; makefile: 693; asm: 211
file content (35 lines) | stat: -rw-r--r-- 2,097 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# *Janus* Interface and Replacement Functionality

*Rtpengine* supports a limited and narrow subset of the features provided by
[Janus](https://janus.conf.meetecho.com/), specifically the basic business
logic behind the *videoroom* plugin. This makes it possible to use *rtpengine*
as a drop-in replacement for *Janus* for this one specific use case, and has
the benefit of being able to use all the extra features that *rtpengine*
provides, such as transcoding, in-kernel packet forwarding for improved
performance, etc.

The required subset of the *Janus* API is exposed via *rtpengine*'s HTTP/WS
interface. The HTTP admin API is connected to the `/admin` URI path using a
JSON payload (same as *Janus* does), while the module communication happens on
the WS protocol `janus-protocol`, also with JSON payloads (same as *Janus*
does). Unlike *Janus*, both HTTP and WS endpoints are running on the same port.
In fact, there is no real distinction between both interfaces, therefore both
admin and non-admin messages can be sent via either interface. HTTPS and WSS
are also supported.

Token-based plugin authentication works similar to how it works in *Janus*
except that only the single *videoroom* plugin is supported. The configuration
setting `janus-secret` must be set to enable clients to connect to this
simulated *Janus* interface and make use of its features.

Under the hood the functionality of the *videoroom* plugin is facilitated using
*rtpengine*'s `publish` and `subscribe` methods, which are mapped directly to
the respective *Janus* methods. One *Janus* video room becomes one *rtpengine*
call, with a distinctive and unique call ID based on the video room ID.

There's currently no support for customising the SDP features and options used
within the *Janus* drop-in mode, and, as *Janus* is WebRTC-specific, all SDPs
produced from this mode can be used directly by WebRTC clients. Non-WebRTC
clients can participate in the same video room as *Janus* clients if the
respective mapped `publish` and `subscribe` methods are used, and with the call
ID mapped to the video room ID.