Introduction

This article and video will go through the janus plugin interface.

So a brief introduction about janus-server would be that it is a WebRTC server which facilitates creation of WebRTC media communication channels and the exchange of communication. You can visit their website for a more detailed communication regarding this software.

Janus has a plugin interface through which we can create multiple addons that work over WebRTC where one such example would be Video Room. Using combinations of plugins like these we can create multiple Web Applications that serve different purposes which is explained well by Lorenzo Miniero in this video

I’ll be doing some analysis of the janus plugin interface in this blog post, and I’ll be focusing on mainly the Video Room plugin for this purpose

Plugin Interface

Janus requires the following functions to be implemented to satisfy the interface:

Editor

Debugger Setup

The following article can be followed to set up janus locally: Link
And you can start debugging the repository using VSCode with the following article: Link

Janus Server communication and connection establishment

The following diagram illustrates the mechanism with which a sample plugin(audio-bridge) establishes connection with Janus WebRTC server, the pattern is similar for other plugins.

The main exchange that starts the WebRTC Peer connection is the exchange of JSEP offer and answer SDP’s which contains the information required to establish a WebRTC connection

Janus

Audio-Bridge in particular has been designed after MCU Architecture where server does the processing to mix all the streams. So the clients only have to deal with a single outgoing and single incoming stream

The Audio Bridge demo is a simple example of how to implement an audio conferencing application through Janus. Since it makes use of the AudioBridge plugin, all the audio contributions will be mixed, which means that a single PeerConnection will be created no matter how many participants will join the room.

References