cargomedia/janus-gateway-audioroom

Name: janus-gateway-audioroom

Owner: Cargo Media

Description: UNMAINTAINED. Janus-gateway plugin to bridge WebRTC audio streams

Created: 2015-10-31 15:53:20.0

Updated: 2018-03-19 12:28:37.0

Pushed: 2017-08-09 09:50:19.0

Homepage:

Size: 147

Language: C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

UNMAINTAINED

This project is not maintained anymore. If you want to take over contact us at tech@cargomedia.ch.

janus-gateway-audioroom

janus-gateway custom plugin.

Build Status

Overview

This plugin is based on native janus/audiobridge plugin and adds additional functionality.

Main extensions:

Configuration
eral]
TE: all paths should exist beforehead

th for job JSONs
b_path = /tmp/jobs

inf pattern for job filenames (.json is auto)
ort usage, the following gets substituted:
time}     is timestamp (guint64)
rand}     is random integer (guin32)
md5}      is md5 of (timestamp + plugin name + random integer)
plugin}   is plugin name ("janus.plugin.cm.rtpbroadcast")
b_pattern = job-#{md5}

th for recording and thumbnailing
chive_path = /tmp/recordings

intf pattern for recordings filenames
ort usage, the following gets substituted:
id}       is streamChannelKey (string)
time}     is timestamp (guint64)
type}     is type ("audio", "video" or "thumb" string)
cording_pattern = rec-#{id}-#{time}-#{type}

e mixer pre-buffering allows to define the time window of audio
P source to be queued before it is mixed with another RTP sources.
 default is set to 6 packets what gives 240ms of time tolerance for
coming packets. If set to 0 then pre-buffering is disabled, as well as
opping of outdated packets is disabled.
xer_prebuffering = 6
Synchronous actions

It supports destroy, list, exists, listparticipants, resetdecoder actions like native janus/audiobridge plugins with change that the id is of type string.

create

It drops support for create and introduce creation of the room with asynchronous action join and changeroom. It records all rooms by default. The room is created with sampling of 48000 by default.

list

It responses with list of current rooms.

Response:


{
    "id": "<string>",
    "uid": "<string>",
    "sampling_rate": "<int>",
    "record": "<boolean>",
    "num_participants": "<int>",
    "description": "<string>"
}

Asychronous actions

It supports join, configure, changeroom, leave actions like native janus/audiobridge plugins with change that the id is of type string.

join

It creates room if does not exist. The room gets default values with sampling of 48000.

Request:


"request": "join",
"id": "<string>"

Response:


"audioroom": "joined",
"id": "<string>",
"uid": "<string>",
"userid": "<int>",
"participants": []

changeroom

It creates room if does not exist. The room gets default values with sampling of 48000. The oldroom is automatically removed if gets empty (no more participants) after change.

Request:


"request": "changeroom",
"id": "<string>"

Response:


"audioroom": "roomchanged",
"id": "<string>",
"uid": "<string>",
"userid": "<int>",
"participants": []

Job files

It creates configurable job-files with plugin events. It support currently for archive-finished event.

archive-finished

"data": {
    "id": "<string>",
    "uid": "<string>",
    "audio": "<archive_path/recording_pattern>.wav"
},
"plugin": "janus.plugin.cm.audioroom",
"event": "archive-finished"

The content of dumped file is of type WAV.

Testing

There is a simple testing script placed in the test/tester.py which allow for triggering basic actions on the plugin. Please find the test/README for more details.

Building

If you got janus-gateway-audioroom from the git repository, you will first need to run the included autogen.sh script to generate the configure script.

togen.sh
nfigure  --prefix=/opt/janus

 install

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.