Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
4ff36c0
Test suspend/resume feature for Audiobridge
Jun 1, 2022
f7f765f
videoroom: add private_id feature and multistream "update" api
Jan 20, 2023
0165a6f
videoroom: map multistream "updating" event to "updated"
Jan 23, 2023
f0d40a0
videoroom: add 0.x properties "audio_codec", "video_codec", "simulcas…
Jan 23, 2023
4e269c0
videoroom: add end-to-end encryption signalling
Jan 25, 2023
479396e
version: bump to v1.6.7
Feb 6, 2023
0344e8a
gitignore: update
Jul 3, 2023
8e64a37
Merge remote-tracking branch 'origin/master' into audiobridge-suspend
Aug 31, 2023
fd9b32d
Support suspended join. Add docs.
Sep 1, 2023
e0fca56
Support pause_events
Sep 4, 2023
4f9f558
WIP
Sep 4, 2023
69a43b2
Fix indentantion
Sep 4, 2023
7dda199
Update package-lock files
Sep 4, 2023
810b9be
Merge branch 'master' into audiobridge-suspend
Sep 4, 2023
62d5b22
add host_family to startForward (#29)
augustblack Sep 4, 2023
e7a9d43
Add events
Sep 6, 2023
0114f85
Fix events
Sep 6, 2023
6691db7
Remove duplicate event
Sep 6, 2023
6428da4
Add partial support for videoroom multistream (replaces #17)
Sep 29, 2023
7129d84
Update package.json (#30)
dota-coach Sep 29, 2023
6f179ad
version: bump to v1.6.8
Sep 29, 2023
572974c
handle: add "ice-failed" event management
Oct 11, 2023
dbbe526
Merge branch 'master' into audiobridge-suspend
Oct 11, 2023
2edb33f
version: bump to v1.6.9
Oct 11, 2023
682cd7b
Merge branch 'master' into audiobridge-suspend
Oct 11, 2023
09d0523
Fix some jsdoc errors
Nov 3, 2023
a79e766
logger: set default level to "info" if verbosity string is not matched
Nov 3, 2023
1e69ecc
jsdoc: small fixes
Nov 6, 2023
4c6fac6
package-lock: update
Nov 8, 2023
3af2554
audiobridge: support suspend/resume API
Dec 5, 2023
ed81cb7
audiobridge: fix handling of suspended/resumed events
Dec 5, 2023
1b69ed6
audiobridge: add mute/unmute API and expose "configured" as an emitte…
Jan 16, 2024
1f61f19
logger: change how verbosity is being set internally
Jan 22, 2024
bf2d989
logger: increase padding
Jan 22, 2024
b6eb92a
videoroom/streaming: add support to e2ee
Jan 26, 2024
c8247f7
videoroom/streaming: add optional e2ee parameter to start request
Jan 26, 2024
d4f1196
streaming: enhance simulcast support
Jan 31, 2024
c9f5014
package.lock: update dependencies
Jan 31, 2024
a061b80
version: bump to v1.6.10
Jan 31, 2024
8e9e6ef
package.json: fix as suggested by npm
Jan 31, 2024
1b7f51c
videoroom: add "streams" parsing to "configured" event
Jan 31, 2024
571587f
Fix unneeded space
Jan 31, 2024
dd722fd
jsdoc: update
Jan 31, 2024
1c07148
jsdoc: update
Jan 31, 2024
6387379
videoroom: fix "streams" parsing in configured event
Feb 2, 2024
6432967
videoroom: support simulcast ports for startForward and fix listForward
Feb 6, 2024
2cfb880
Add admin_key to createRtpMountpoint (#36)
OverSamu Feb 9, 2024
28d019c
streaming: add "admin_key" parameter to list API
Feb 9, 2024
1090ff4
videoroom: add "admin_key" parameter to list, create and stop_rtp_for…
OverSamu Feb 9, 2024
7b976c9
Fix browser bundling example
Feb 28, 2024
34c4831
gitignore: update
Feb 29, 2024
0171687
version: bump to v1.6.11
Feb 29, 2024
084aadc
Add WebRTC Data Channel Support to streaming-client.js (#38)
guilherme-marcello Mar 2, 2024
4b7fb38
examples: lint streaming js client
Mar 4, 2024
214f732
Test
Mar 6, 2024
8131fee
videoroom: add vp9 profile to create
Mar 11, 2024
14ce8af
videoroom example: update deps, await detach, do not detach when unpu…
Mar 28, 2024
7c6d0f3
audiobridge: add "admin_key" to create and rtp forward APIs
Apr 10, 2024
c7eed0f
Remove an empty file
Apr 15, 2024
7f647bf
audiobridge: add denoise parameter to create
May 6, 2024
b36e0f1
Migrate to eslint v9 with flat configs and update all dependencies
Jun 13, 2024
cfbf7a5
ci: update node version
Jun 13, 2024
5463656
Add "--debug" to eslint
Jun 13, 2024
b649cff
eslint: update rules
Jun 13, 2024
19ab368
videoroom: enhanced multistream support (#40)
Jun 13, 2024
4daf90f
handle: fix typo
Jun 13, 2024
a05e767
version: bump to v1.7.0
Jun 13, 2024
b1439ad
audiobridge: add codec param to join API (fixes #41)
Jul 8, 2024
75149c3
Custom collision parameter in streaming plugin (#43)
Qizot Jul 22, 2024
8acce28
version: bump to v1.7.1
Jul 22, 2024
84b41b8
Add missing keyframe parameter to videoroom configure (#44)
Qizot Jul 26, 2024
5159a72
Add support for permanent option in destroy mountpoint (#45)
elmotron Jul 30, 2024
4792d5b
videoroom: add missing pin parameter to joinSubscriber (#48)
mDev86 Nov 11, 2024
4b75b33
videoroom: add "threads" parameter to create API
Nov 22, 2024
7e8b920
videoroom: add "offer_audio" "offer_video" and "offer_data" to joinSu…
Nov 25, 2024
bb6642c
videoroom: fix parse "Leave" and "Unpublish" event (#50)
mDev86 Dec 2, 2024
053a39e
version: bump to v1.7.2
Dec 2, 2024
876099e
logger: new alias for setLevel. Support a function as parameter.
Jan 16, 2025
1ff1ef9
transport-ws: flag as closed before signaling close event
Jan 17, 2025
8609807
transport-ws: set closing to false before signaling close event
Jan 17, 2025
239dfa0
deps: update
Jan 20, 2025
efc666a
streaming: enhanced multistream support (#52)
OverSamu Feb 26, 2025
ed70b3e
videoroom: add "notify_joining" parameter to create API (#53)
OverSamu Feb 26, 2025
3e603b6
audiobridge: add "rtp_participant" to configure API
Apr 2, 2025
de30d41
handle: use core helpers for setting and getting plugin events
Apr 3, 2025
57923c5
Merge branch 'master' into test/ab-configure-rtp
Apr 3, 2025
e3e9deb
Fix one-off error for max_retries
Apr 8, 2025
377b9fb
Clarify a bit the meaning of CONNECTION_ERROR event (e.g. unexpected …
Apr 8, 2025
2e4f520
audiobridge: add support for RTP participants in the "configure" API
Apr 8, 2025
d169c52
audiobridge: add support for the play_file APIs and list_announcement…
lminiero Apr 8, 2025
20a9fc4
ci: update workflow
Apr 8, 2025
cb20806
version: bump to v1.7.3
Apr 8, 2025
065d1df
streaming: add support for client-side offers (#55)
lminiero Apr 8, 2025
b95dfd2
version: bump to v1.7.4
Apr 8, 2025
599b18b
Fix docs typos
Apr 28, 2025
1f8bdec
package.json: add jsdoc dev dependency and script to build documentation
Apr 28, 2025
8ebf66e
docs: fix typo in videoroom
Apr 28, 2025
28c9ccd
package.json: update build-docs script
Apr 28, 2025
424695e
gitignore: update
Apr 29, 2025
079ead7
docs: huge refactoring. Use a nicer template.
Apr 29, 2025
c695d74
eslint: bump version and update config
Apr 29, 2025
4b2cb05
eslint: mark deprecated rules
Apr 30, 2025
9a6da04
docs: update
Apr 30, 2025
e77f5b5
README: add instructions to build documentation
Apr 30, 2025
9f4911f
npm: update dependecies
Apr 30, 2025
15d6b5c
eslint: update config
Apr 30, 2025
a62cf4f
ga: update linting workflow
May 21, 2025
95662e8
ga: rename liniting job
May 21, 2025
046b26f
docs: remove package.json location from build configuration
May 21, 2025
328c194
docs: add GA workwflow for publishing docs on GitHub pages
May 21, 2025
e225f13
readme: add link to online documenation
May 21, 2025
1e43646
docs: generate online docs for "v1." tags
May 21, 2025
4d8fff9
version: bump to v1.7.5
May 21, 2025
d753288
session: set the correct event name for "detached" filtering (fixes #59)
May 26, 2025
a8247c3
ga: remove npm caching from docs building workflow
May 26, 2025
b6d7c03
sip: add support for SIP plugin (resolves #34)
May 26, 2025
f614278
package.json: export Handle class under janode/handle
Jun 3, 2025
fd50db8
misc: add pre-release helper script (useful for preparing a new release)
Jun 4, 2025
1273c10
Add support for Record&Play plugin (#60)
lminiero Jun 24, 2025
d8ce461
Add support for TextRoom plugin (Janus API only) (#61)
lminiero Jun 24, 2025
9473ed6
version: bump to v1.8.0
lminiero Jun 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/janode-ci.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/janode-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master
- test-docs
tags:
- v1.*
jobs:
build-and-deploy:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
runs-on: ubuntu-24.04
env:
REF_NAME: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/jod
- run: npm ci
- run: npm run build-docs
- name: Add git reference to docs path
run: |
mkdir -p site/docs/$REF_NAME
cp -a docs/. site/docs/$REF_NAME
- name: Update "latest" docs for tagged versions
if: startsWith(github.ref, 'refs/tags/v')
run: |
cp -a docs/. site/docs/latest
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
keep_files: true
22 changes: 22 additions & 0 deletions .github/workflows/janode-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint Janode code

on:
push:
branches:
- master
- test-lint
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build-and-lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/jod
- run: npm ci
- run: npm run lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules
build
out
docs
.vscode

config.js
bundle.js
Expand All @@ -12,3 +14,4 @@ bundle.js
!.eslintrc.json
!package.json
!package-lock.json
!jsdoc.json
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ Internally uses WebSockets or Unix DGRAM Sockets to connect to Janus.

The library wraps the Janus core API, the Janus Admin API and some of the most popular plugins APIs.

The supported Janus plugins currently are:
The supported Janus plugins are:

- EchoTest
- AudioBridge
- Streaming
- VideoRoom
- SIP
- Record&Play
- TextRoom (Janus API only)

The library is available on [npm](https://www.npmjs.com/package/janode) and the source code is on [github](https://github.com/meetecho/janode).

Online documentation can be found at [https://meetecho.github.io/janode](https://meetecho.github.io/janode).

## Example of usage

This is just a pretty simple hello world for the echotest plugin.
Expand Down Expand Up @@ -141,3 +146,19 @@ You need to create a bundle with the core library and the needed plugins using a

If you get the code from the repo, you can find a `rollup` bundling sample in the `bundle.sh` script under `examples/browser/`.
The output will be a `bundle.js` script that defines an `App` global object with the members `Janode` and `EchoTestPlugin`.

## How to build documentation

First install the dev dependecies:

```bash
npm install
```

Then use the npm script:

```bash
npm run build-docs
```

Documentation in HTML format will be built under the `docs` folder.
60 changes: 60 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import globals from 'globals';

export default defineConfig([
{
files: [
'*.js',
'src/**/*.js',
'examples/**/*.js'
],
ignores: [
'examples/browser/**/*'
],
plugins: {
js
},
extends: ['js/recommended'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node
}
},
rules: {
'no-unused-vars': [
'warn',
{
'args': 'all',
'vars': 'all',
'caughtErrors': 'all',
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_'
}
],
'no-empty': 'off',
// deprecated rules
'no-trailing-spaces': 'warn',
'indent': [
'warn',
2,
{
'SwitchCase': 1
}
],
'quotes': [
'warn',
'single'
],
'semi': [
'warn',
'always'
],
'multiline-comment-style': 1
}
}
]);
5 changes: 0 additions & 5 deletions examples/audiobridge/html/.eslintrc.json

This file was deleted.

78 changes: 76 additions & 2 deletions examples/audiobridge/html/audiobridge-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-sparse-arrays */
/* global io */

'use strict';
Expand All @@ -10,6 +9,7 @@ let pendingOfferMap = new Map();
const myRoom = getURLParameter('room') ? parseInt(getURLParameter('room')) : (getURLParameter('room_str') || 1234);
const randName = ('John_Doe_' + Math.floor(10000 * Math.random()));
const myName = getURLParameter('name') || randName;
let myFeed;
const skipJoin = getURLParameter('skipjoin') || false;
const skipOffer = getURLParameter('skipoffer') || false;

Expand All @@ -26,6 +26,7 @@ function getId() {
}

function getURLParameter(name) {
// eslint-disable-next-line no-sparse-arrays
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ''])[1].replace(/\+/g, '%20')) || null;
}

Expand All @@ -50,11 +51,12 @@ const socket = io({
reconnection: false,
});

function join({ room = myRoom, display = myName, muted = false, token = null, rtp_participant = null, group = null } = {}) {
function join({ room = myRoom, display = myName, muted = false, suspended = false, token = null, rtp_participant = null, group = null } = {}) {
const joinData = {
room,
display,
muted,
suspended,
token,
rtp_participant,
group,
Expand Down Expand Up @@ -251,6 +253,32 @@ function _listForward({ room = myRoom, secret = 'adminpwd' } = {}) {
});
}

function _mutePeer({ room = myRoom, feed = myFeed, secret = 'adminpwd' } = {}) {
let muteData = {
room,
feed,
secret,
};

socket.emit('mute-peer', {
data: muteData,
_id: getId(),
});
}

function _unmutePeer({ room = myRoom, feed = myFeed, secret = 'adminpwd' } = {}) {
let unmuteData = {
room,
feed,
secret,
};

socket.emit('unmute-peer', {
data: unmuteData,
_id: getId(),
});
}

function _muteRoom({ room = myRoom, secret = 'adminpwd' } = {}) {
let muteData = {
room,
Expand All @@ -275,6 +303,35 @@ function _unmuteRoom({ room = myRoom, secret = 'adminpwd' } = {}) {
});
}

function _suspend({ room = myRoom, feed = myFeed, stop_record = false, secret = 'adminpwd' } = {}) {
let suspendData = {
room,
feed,
stop_record,
secret,
};

socket.emit('suspend-peer', {
data: suspendData,
_id: getId(),
});
}

function _resume({ room = myRoom, feed = myFeed, record = false, filename, secret = 'adminpwd' } = {}) {
let resumeData = {
room,
feed,
record,
secret,
};
if (filename) resumeData.filename = filename;

socket.emit('resume-peer', {
data: resumeData,
_id: getId(),
});
}

socket.on('connect', () => {
console.log('socket connected');
socket.sendBuffer = [];
Expand Down Expand Up @@ -305,6 +362,7 @@ socket.on('audiobridge-error', ({ error, _id }) => {

socket.on('joined', async ({ data }) => {
console.log('you have joined to room', data);
myFeed = data.feed;
removeAllAudioElements();
closePC();
setAudioElement(null, data.feed, data.display, data.room);
Expand Down Expand Up @@ -381,6 +439,14 @@ socket.on('peer-talking', ({ data }) => {
console.log('peer talking notify', data);
});

socket.on('peer-suspended', ({ data }) => {
console.log('peer suspended notify', data);
});

socket.on('peer-resumed', ({ data }) => {
console.log('peer resumed notify', data);
});

socket.on('exists', ({ data }) => {
console.log('room exists', data);
});
Expand Down Expand Up @@ -420,6 +486,14 @@ socket.on('rtp-fwd-list', ({ data }) => {
console.log('rtp forwarders list', data);
});

socket.on('peer-muted', ({ data }) => {
console.log('peer muted', data);
});

socket.on('peer-unmuted', ({ data }) => {
console.log('peer unmuted', data);
});

socket.on('room-muted', ({ data }) => {
console.log('room muted', data);
});
Expand Down
Loading