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.
The official documentation can be generated from source.
The following Transports are possible
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();
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();
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();
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();
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
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.
This module is released under AGPL-3.0, if its unsuitable for your needs, you may contact us.