Janus-Admin API

Node.JS Janus Admin API

Project Details

  • Stack : Node.JS
  • Stage : Pre-Alpha

Node.JS Janus Admin API

Janus is a WebRTC Server developed by Meetecho.

This is a complete Janus Admin API client which enables easy access through HTTP, WebSockets, MQTT and RabbitMQ.

The major components include a Transport and JanusAdmin where Transport is implemented by either WebSocketTransport, HTTPTransport or EventClientTransport. EventClientTransport is using IEventClient which is implemented by MQTTEventClient and AMQPEventClient.

The JanusAdmin uses the transport to communicate with the Janus API to provide easy access and provide a consistent experience no matter the communication technology you choose to base your operations on.

Documentation

The official documentation can be generated from source.

Examples

The following Transports are possible

WebSocket

const transport = new WebSocketTransport("ws://janus-server:7188", "janus-admin-protocol");
await transport.waitForReady();

const admin = new JanusAdmin(transport, "janusoverlord");
await admin...

await transport.dispose();

MQTT

const transport = new EventClientTransport(new MQTTEventClient("tcp://janus-server:1883", { username: "guest", password: "guest" }), "from-janus-admin/#", "to-janus-admin", true);
await transport.waitForReady()

const admin = new JanusAdmin(transport, "janusoverlord");
await admin...


await transport.dispose();

RabbitMQ

const transport =  new EventClientTransport(new AMQPEventClient({ hostname: "janus-server", username: "guest", password: "guest" }, { noDelay: true }), "from-janus-admin", "to-janus-admin", true);
await transport.waitForReady()

const admin = new JanusAdmin(transport, "janusoverlord");
await admin...


await transport.dispose();

HTTP

const transport =  new HTTPTransport("http://janus-server:7088/admin", "janusoverlord", true);
await transport.waitForReady()

const admin = new JanusAdmin(transport, "janusoverlord");
await admin...


await transport.dispose();

How to Configure Your Janus Instance

It could be hard to figure out the right settings the first time, that’s why we’ve included a sample Dockerfile and configuration that we test this code on, feel free to copy it or use it as-is for your needs, you can find it in the janus-docker repository.

git clone https://github.com/LiluSoft/janus-docker.git
cd janus-docker
docker-compose up

Upcoming

Implementation of Janus client, events and WebRTC is in progress, feel free to take a look and express your opinion.

Implementation of Video Room and Admin are in their final stages.

License

This module is released under AGPL-3.0, if its unsuitable for your needs, you may contact us.