https://github.com/michaelfranzl/minnie-janus
Small, ES8, isomorphic library for interfacing with the Janus WebRTC gateway.
https://github.com/michaelfranzl/minnie-janus
es8 janus-gateway javascript javascript-module stampit webrtc
Last synced: 6 months ago
JSON representation
Small, ES8, isomorphic library for interfacing with the Janus WebRTC gateway.
- Host: GitHub
- URL: https://github.com/michaelfranzl/minnie-janus
- Owner: michaelfranzl
- License: mit
- Created: 2018-01-01T11:09:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-06T11:20:44.000Z (over 1 year ago)
- Last Synced: 2024-08-10T09:13:27.070Z (10 months ago)
- Topics: es8, janus-gateway, javascript, javascript-module, stampit, webrtc
- Language: JavaScript
- Homepage:
- Size: 411 KB
- Stars: 31
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# minnie-janus

A small, modern, general interface module written in ES8 Javascript for the [Janus WebRTC gateway
API](https://janus.conf.meetecho.com/docs/rest.html), for browsers as well as Node.js.Inspiration came from the project [minijanus](https://github.com/mozilla/minijanus.js) (hence this
name, 'minnie-janus'), but this is a rewrite from scratch because I needed ES modules, events,
async/await syntax, better logging, and a fix of one small
[API issue](https://github.com/mozilla/minijanus.js/issues/3) in minijanus.Provided are two behavior implementations, `Session` (see [src/session.js](src/session.js)) and
`BasePlugin` (see [src/base-plugin.js](src/base-plugin.js)), which transparently map to their
server-side equivalents.`BasePlugin` is supposed to be extended with per-plugin logic before being attached to a `Session`
instance, because Janus plugins are more like applications with very specific behavior. See
examples below on how to extend the `BasePlugin` implementation.Neither `Session` nor `BasePlugin` instances actually communicate with janus-gateway. The parent
application instantiating a `Session` is responsible for wiring up the transport of choice (REST
HTTP(S), (Secure) WebSockets, etc.) to the `Session.receive()` method and the `Session#output`
event.Usage of mini-janus is best illustrated by the full demo/example implementing the 'echotest' plugin
(included in Janus' source code). It can be found in the [demo](demo) subdirectory (see also
[demo/README.md](demo/README.md) there).The implementation has been [automatically tested](test) against the following `janus-gateway` versions:
* 0.7
* 0.8
* 0.9
* 0.14## Usage
See:
1. echotest [demo](demo) contained in this repository
2. [janus-rtpforward-plugin demo](https://github.com/michaelfranzl/janus-rtpforward-plugin/tree/master/demo)