diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index ac305a66a4..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - "env": { - "browser": true, - "es6": true, - "jquery": true - }, - "parserOptions": { - "ecmaVersion": 2017 - }, - "extends": "eslint:recommended", - "rules": { - "no-console": "off", - "no-empty": "off" - }, - "globals": { - "adapter": "readonly", - "RTCRtpTransceiver": "readonly" - } -}; diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 641486aa07..2ad722eae5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -8,15 +8,15 @@ welcome to make it better. If you want to open an issue, please make sure that: 1. you actually found a bug: for generic questions, use the -[meetecho-janus](http://groups.google.com/d/forum/meetecho-janus) +[Discourse](https://janus.discourse.group/) group instead; 2. nobody opened the same bug already (do a search); 3. the issue wasn't already solved; 4. you don't paste a huge amount of text in the issue or comments: use -a service like [pastebin](http://pastebin.com/) or similar; +a service like [pastebin](https://pastebin.com/) or similar; 5. you provide a GDB stacktrace if Janus crashed on you, and/or output from AddressSanitizer or Valgrind (more details available -[here](http://janus.conf.meetecho.com/docs/debug.html)). +[here](https://janus.conf.meetecho.com/docs/debug.html)). If you want to contribute to the project by providing fixes, enhancements, new features or other materials, then just clone the repo, make your changes, push to diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 423a5a8b22..1f43fba818 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: -- name: 💬 Janus Community (Google Group) - url: https://groups.google.com/g/meetecho-janus - about: Please ask questions or discuss runtime problems on the group, not GitHub +- name: 💬 Janus Community (Discourse) + url: https://janus.discourse.group/ + about: Please ask questions or discuss runtime problems on the group, not GitHub diff --git a/.github/workflows/janus-ci.yml b/.github/workflows/janus-ci.yml index 71e74249af..a08febe4f1 100644 --- a/.github/workflows/janus-ci.yml +++ b/.github/workflows/janus-ci.yml @@ -2,176 +2,216 @@ name: janus-ci on: push: - branches: [ master ] + branches: + - master + - test-ci pull_request: - branches: [ master ] + branches: + - master permissions: contents: read jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: compiler: [gcc, clang] - datachannels: ["yes", "no"] - libcurl: ["yes", "no"] + datachannels: ["enable-datachannels", "disable-datachannels"] + libcurl: ["enable-libcurl", "disable-libcurl"] include: - - datachannels: "yes" - libcurl: "yes" + - datachannels: "enable-datachannels" + libcurl: "enable-libcurl" deps_from_src: "yes" janus_config_opts: "" - - datachannels: "yes" - libcurl: "no" + - datachannels: "enable-datachannels" + libcurl: "disable-libcurl" deps_from_src: "no" janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-turn-rest-api --disable-sample-event-handler" - - datachannels: "no" - libcurl: "yes" + - datachannels: "disable-datachannels" + libcurl: "enable-libcurl" deps_from_src: "no" janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-data-channels" exclude: - - datachannels: "no" - libcurl: "no" + - datachannels: "disable-datachannels" + libcurl: "disable-libcurl" env: - CC: ${{ matrix.compiler }} + CC: ${{ matrix.compiler }} steps: - - name: install janus apt dependencies - run: > - sudo apt-get update && sudo apt-get --no-install-recommends -y install - autoconf - cmake - duktape-dev - gtk-doc-tools - libavcodec-dev - libavformat-dev - libavutil-dev - libcollection-dev - libconfig-dev - libevent-dev - libglib2.0-dev - libgirepository1.0-dev - liblua5.3-dev - libjansson-dev - libmicrohttpd-dev - libmount-dev - libnanomsg-dev - libogg-dev - libopus-dev - librabbitmq-dev - libsofia-sip-ua-dev - libssl-dev - libtool - libvorbis-dev - ninja-build - openssl - - name: setup additional dependencies from apt - if: ${{ matrix.deps_from_src == 'no' }} - run: > - sudo apt-get --no-install-recommends -y install - libnice-dev - libsrtp2-dev - libusrsctp-dev - libwebsockets-dev - - name: install libcurl from apt - if: ${{ matrix.libcurl == 'yes' }} - run: sudo apt-get --no-install-recommends -y install libcurl4-openssl-dev - - name: setup python - if: ${{ matrix.deps_from_src == 'yes' }} - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: 'x64' - - name: install python packages - if: ${{ matrix.deps_from_src == 'yes' }} - run: pip install wheel meson - - name: setup libnice from sources - if: ${{ matrix.deps_from_src == 'yes' }} - run: | - git clone --depth 1 --quiet -b master https://gitlab.freedesktop.org/libnice/libnice.git libnice - pushd libnice - if [ $CC = clang ]; then LNICE_CFLAGS="-Wno-cast-align"; fi; - meson setup -Dprefix=/usr -Dlibdir=lib -Dc_args="$LNICE_CFLAGS" -Ddebug=false -Doptimization=0 -Dexamples=disabled -Dgtk_doc=disabled -Dgupnp=disabled -Dgstreamer=disabled -Dtests=disabled build - ninja -C build - sudo ninja -C build install - - name: checkout libsrtp source - if: ${{ matrix.deps_from_src == 'yes' }} - uses: actions/checkout@v3 - with: - repository: cisco/libsrtp - ref: v2.4.2 - - name: setup libsrtp from sources - if: ${{ matrix.deps_from_src == 'yes' }} - run: | - ./configure --prefix=/usr --enable-openssl - make -j$(nproc) shared_library - sudo make install - - name: checkout usrsctp source - if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }} - uses: actions/checkout@v3 - with: - repository: sctplab/usrsctp - ref: master - - name: setup usrsctp from sources - if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }} - run: | - ./bootstrap - ./configure --prefix=/usr --disable-static --disable-debug --disable-programs --disable-inet --disable-inet6 - make -j$(nproc) - sudo make install - - name: checkout lws source - if: ${{ matrix.deps_from_src == 'yes' }} - uses: actions/checkout@v3 - with: - repository: warmcat/libwebsockets - ref: v4.3.2 - - name: setup lws from sources - if: ${{ matrix.deps_from_src == 'yes' }} - run: | - mkdir -p build - pushd build - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_WITH_STATIC=OFF -DLWS_WITHOUT_CLIENT=ON -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITH_HTTP2=OFF .. - make -j$(nproc) - sudo make install - - name: checkout paho-mqtt source - if: ${{ matrix.deps_from_src == 'yes' }} - uses: actions/checkout@v3 - with: - repository: eclipse/paho.mqtt.c - ref: v1.3.12 - - name: setup paho-mqtt from sources - if: ${{ matrix.deps_from_src == 'yes' }} - run: | - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=FALSE -DPAHO_BUILD_DOCUMENTATION=FALSE . - make -j$(nproc) - sudo make install - - name: checkout janus source - uses: actions/checkout@v3 - - name: build janus from sources - env: - JANUS_CONFIG_COMMON: "--disable-docs --enable-post-processing --enable-plugin-lua --enable-plugin-duktape --enable-json-logger" - JANUS_CONFIG_OPTS: ${{ matrix.janus_config_opts }} - run: | - ./autogen.sh - ./configure $JANUS_CONFIG_COMMON $JANUS_CONFIG_OPTS - make -j$(nproc) - make check-fuzzers + - name: install janus apt dependencies + run: > + sudo apt-get update && sudo apt-get --no-install-recommends -y install + duktape-dev + libavcodec-dev + libavformat-dev + libavutil-dev + libconfig-dev + libglib2.0-dev + libgirepository1.0-dev + liblua5.3-dev + libjansson-dev + libmicrohttpd-dev + libnanomsg-dev + libogg-dev + libopus-dev + libpcap-dev + librabbitmq-dev + libsofia-sip-ua-dev + libssl-dev + libtool + meson + ninja-build + - name: setup additional dependencies from apt + if: ${{ matrix.deps_from_src == 'no' }} + run: > + sudo apt-get --no-install-recommends -y install + libnice-dev + libsrtp2-dev + libusrsctp-dev + libwebsockets-dev + # Workaround for https://github.com/actions/runner-images/issues/11926 + - name: install cmake v3.31 + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: "3.31.6" + - name: install libcurl from apt + if: ${{ matrix.libcurl == 'enable-libcurl' }} + run: sudo apt-get --no-install-recommends -y install libcurl4-openssl-dev + - name: setup python + if: ${{ matrix.deps_from_src == 'yes' }} + uses: actions/setup-python@v5 + with: + python-version: "3.13" + architecture: "x64" + - name: checkout libnice source + if: ${{ matrix.deps_from_src == 'yes' }} + uses: actions/checkout@v4 + with: + repository: libnice/libnice + ref: master + - name: setup libnice from sources + if: ${{ matrix.deps_from_src == 'yes' }} + run: | + meson setup -Dprefix=/usr -Dlibdir=lib -Dc_args="-O0 -Wno-cast-align" \ + -Dexamples=disabled \ + -Dgtk_doc=disabled \ + -Dgstreamer=disabled \ + -Dgupnp=disabled \ + -Dtests=disabled \ + build + ninja -C build + sudo ninja -C build install + - name: checkout libsrtp source + if: ${{ matrix.deps_from_src == 'yes' }} + uses: actions/checkout@v4 + with: + repository: cisco/libsrtp + ref: v2.7.0 + - name: setup libsrtp from sources + if: ${{ matrix.deps_from_src == 'yes' }} + run: | + ./configure --prefix=/usr CFLAGS="-O0" \ + --disable-pcap \ + --enable-openssl + make -j$(nproc) shared_library + sudo make install + - name: checkout usrsctp source + if: ${{ matrix.datachannels == 'enable-datachannels' && matrix.deps_from_src == 'yes' }} + uses: actions/checkout@v4 + with: + repository: sctplab/usrsctp + ref: master + - name: setup usrsctp from sources + if: ${{ matrix.datachannels == 'enable-datachannels' && matrix.deps_from_src == 'yes' }} + run: | + ./bootstrap + ./configure --prefix=/usr CFLAGS="-O0" \ + --disable-debug \ + --disable-inet \ + --disable-inet6 \ + --disable-programs \ + --disable-static \ + --enable-shared + make -j$(nproc) + sudo make install + - name: checkout lws source + if: ${{ matrix.deps_from_src == 'yes' }} + uses: actions/checkout@v4 + with: + repository: warmcat/libwebsockets + ref: v4.3-stable + - name: setup lws from sources + if: ${{ matrix.deps_from_src == 'yes' }} + run: | + mkdir build && cd build + cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS="-O0" \ + -DLWS_ROLE_RAW_FILE=OFF \ + -DLWS_WITH_HTTP2=OFF \ + -DLWS_WITHOUT_EXTENSIONS=OFF \ + -DLWS_WITHOUT_TESTAPPS=ON \ + -DLWS_WITHOUT_TEST_CLIENT=ON \ + -DLWS_WITHOUT_TEST_PING=ON \ + -DLWS_WITHOUT_TEST_SERVER=ON \ + -DLWS_WITH_STATIC=OFF \ + .. + make -j$(nproc) + sudo make install + - name: checkout paho-mqtt source + if: ${{ matrix.deps_from_src == 'yes' }} + uses: actions/checkout@v4 + with: + repository: eclipse/paho.mqtt.c + ref: v1.3.14 + - name: setup paho-mqtt from sources + if: ${{ matrix.deps_from_src == 'yes' }} + run: | + mkdir build.paho && cd build.paho + cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS="-O0" \ + -DPAHO_HIGH_PERFORMANCE=TRUE \ + -DPAHO_BUILD_DOCUMENTATION=FALSE \ + -DPAHO_BUILD_SAMPLES=FALSE \ + -DPAHO_BUILD_SHARED=TRUE \ + -DPAHO_BUILD_STATIC=FALSE \ + -DPAHO_ENABLE_TESTING=FALSE \ + -DPAHO_WITH_SSL=TRUE \ + .. + make -j$(nproc) + sudo make install + - name: checkout janus source + uses: actions/checkout@v4 + - name: build janus from sources + env: + JANUS_CONFIG_COMMON: "--disable-docs --enable-post-processing --enable-plugin-lua --enable-plugin-duktape --enable-json-logger" + JANUS_CONFIG_OPTS: ${{ matrix.janus_config_opts }} + run: | + ./autogen.sh + ./configure $JANUS_CONFIG_COMMON $JANUS_CONFIG_OPTS CFLAGS="-O0" + make -j$(nproc) + make check-fuzzers javascript-lint: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - name: Install modules - run: npm install --only=dev - - name: Run ESLint - run: node_modules/.bin/eslint html/janus.js - javascript-rollup: - runs-on: ubuntu-22.04 + - uses: actions/checkout@v4 + - name: Install modules + run: | + cd npm + npm install + - name: Run ESLint + run: | + cd npm + npm run lint + javascript-dist: + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - name: Rollup - run: | - cd npm - npm install - npm run rollup -- --o janus.cjs.js --f cjs - - uses: actions/upload-artifact@v3 - with: - name: janus.cjs.js - path: npm/janus.cjs.js + - uses: actions/checkout@v4 + - name: Install modules + run: | + cd npm + npm install + - name: Make dist files + run: | + cd npm + npm run prerelease + - uses: actions/upload-artifact@v4 + with: + name: janus.es.js + path: npm/dist/janus.es.js diff --git a/.gitignore b/.gitignore index 363f19085b..5526f4c9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ cmdline.c cmdline.h version.c docs/html/ +janus-gateway.pc janus janus-cfgconv @@ -23,6 +24,7 @@ Makefile.in /depcomp /compile /install-sh +/install-sh~ /ltmain.sh /config.log @@ -41,12 +43,14 @@ p2m-cmdline.c p2m-cmdline.h /fuzzers/out +npm/dist +npm/src + /conf/janus.cfg.sample /conf/janus.plugin.duktape.cfg.sample /conf/janus.plugin.lua.cfg.sample /conf/janus.plugin.recordplay.cfg.sample /conf/janus.plugin.streaming.cfg.sample -/conf/janus.plugin.voicemail.cfg.sample /conf/janus.transport.http.cfg.sample /conf/janus.transport.websockets.cfg.sample /conf/janus.jcfg.sample @@ -54,11 +58,12 @@ p2m-cmdline.h /conf/janus.plugin.lua.jcfg.sample /conf/janus.plugin.recordplay.jcfg.sample /conf/janus.plugin.streaming.jcfg.sample -/conf/janus.plugin.voicemail.jcfg.sample .deps .dirstamp +cov-int + # OS X .DS_Store @@ -67,3 +72,4 @@ p2m-cmdline.h .vscode node_modules +.venv diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b6db239ed..3ef8c06ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,207 @@ All notable changes to this project will be documented in this file. +## [v1.4.0] - 2026-02-06 + +- Generate a pkg-config .pc file when installing Janus [[PR-3596](https://github.com/meetecho/janus-gateway/pull/3596)] +- Implemented compound RTCP reports (thanks @addisonpolcyn!) [[PR-3585](https://github.com/meetecho/janus-gateway/pull/3585)] +- Fixed when to negotiate the rtcp-fb transport-cc SDP attribute [[PR-3595](https://github.com/meetecho/janus-gateway/pull/3595)] +- Strip some WebRTC-specific SDP attributes in SIP and NoSIP plugins +- Added RTP forwarders support to SIP and NoSIP plugins (thanks @WebTrit!) [[PR-3583](https://github.com/meetecho/janus-gateway/pull/3583)] +- Fixed subscription renewal possibly going to the wrong host in the SIP plugin (thanks @digiboridev!) [[PR-3602](https://github.com/meetecho/janus-gateway/pull/3602)] +- Laid foundations for plugin-specific unique session ID in SIP and NoSIP plugins [[PR-3607](https://github.com/meetecho/janus-gateway/pull/3607)] +- Fixed 'use-after-free' in SIP session helpers (thanks @oleksandr-mihal-zultys!) [[PR-3613](https://github.com/meetecho/janus-gateway/pull/3613)] +- Fixed SIP plugin not offering SRTP in response to offerless INVITEs [[PR-3618](https://github.com/meetecho/janus-gateway/pull/3618)] +- Added new janus-pp-rec option to ignore RTP headers for timing purposes +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.3.3] - 2025-10-21 + +- Refactored keyframe buffering in Streaming plugin to store following deltas too (thanks [Byborg](https://www.byborgenterprises.com/)!) [[PR-3564](https://github.com/meetecho/janus-gateway/pull/3564)] +- Added optional events for RTSP disconnections/reconnections in the Streaming plugin [[PR-3578](https://github.com/meetecho/janus-gateway/pull/3578)] +- Fixed rare crash when reconnecting to RTSP servers in the Streaming plugin [[PR-3580](https://github.com/meetecho/janus-gateway/pull/3580)] +- Fixed small leak when recording Streaming mountpoints +- Fixed memory leak when stopping non-existing forwarders in the VideoRoom plugin +- Fixed rare crash in AudioBridge when notifying participants [[PR-3589](https://github.com/meetecho/janus-gateway/pull/3589)] +- Fixed payload type when RTP-forwarding AudioBridge rooms using G.711 +- Added option for managing ringing manually in the SIP plugin (thanks @adnanel!) [[PR-3556](https://github.com/meetecho/janus-gateway/pull/3556)] +- Save custom headers and send them on SIP hangup event (thanks @kenangenjac!) [[PR-3558](https://github.com/meetecho/janus-gateway/pull/3558)] +- Fix small memory leak in SIP plugin (thanks @oleksandr-mihal-zultys!) [[PR-3565](3565)] +- Added support for Linux cooked capture v2 to pcap2mjr +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.3.2] - 2025-07-10 + +- Added workaround to potential libnice issue +- Deprecated nice_debug option (libnice debugging can be enabled via env variables) [[PR-3546](https://github.com/meetecho/janus-gateway/pull/3546)] +- Fixed broken session count in case of timeouts [[Issue-3526](https://github.com/meetecho/janus-gateway/issues/3526)] +- Fixed broken session count in case of API disconnections [[Issue-3532](https://github.com/meetecho/janus-gateway/issues/3532)] +- Added experimental support for the video-layers-allocation extension [PR-3504](https://github.com/meetecho/janus-gateway/pull/3504)] +- Added optional signal handler for log rotation [[PR-3550](https://github.com/meetecho/janus-gateway/pull/3550)] +- Fixed memory leaks when using dummy publishers [[PR-3541](https://github.com/meetecho/janus-gateway/pull/3541)] +- New options to advertise VideoRoom dummy publishers as e2ee [[PR-3553](https://github.com/meetecho/janus-gateway/pull/3553)] +- Fixed rare crash when using remote publishers in VideoRoom [[PR-3557](https://github.com/meetecho/janus-gateway/pull/3557)] +- Added request to stop all AudioBridge announcements in a room (thanks @keremcadirci!) [[PR-3403](https://github.com/meetecho/janus-gateway/pull/3403)] +- Allow plain RTP participants in AudioBridge to use generate_offer too [[PR-3534](https://github.com/meetecho/janus-gateway/pull/3534)] +- Fixed breaking condition in AudioBridge +- Fixed broken canvas demo [[Issue-3527](https://github.com/meetecho/janus-gateway/issues/3527)] +- Fixed broken multiopus demo +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.3.1] - 2025-03-05 + +- Make ip-utils aware of 0.0.0.0 and :: [[Issue-3470](https://github.com/meetecho/janus-gateway/issues/3470)] +- Optimize NACKs handling [[PR-3491](https://github.com/meetecho/janus-gateway/pull/3491)] +- Skip medium lookup when relaying RTCP by plugins to fix rare deadlock [[PR-3515](https://github.com/meetecho/janus-gateway/pull/3515)] +- Fixed FEC and DTX negotiated in VideoRoom also when not enabled in the room settings +- Fixed memory leak in VideoRoom (thanks @m08pvv!) [[PR-3493](https://github.com/meetecho/janus-gateway/pull/3493)] +- Fixed broken recordings when using remote publishers in the VideoRoom [[PR-3509](https://github.com/meetecho/janus-gateway/pull/3509)] +- Check if IPv6 is disabled when loading the Streaming plugin [[PR-3519](https://github.com/meetecho/janus-gateway/pull/3519)] +- Fixed SSRC not being set to a default value in AudioBridge forwarders when not explicitly set in the request +- Add support for "progress" request on SIP Plugin (thanks @adnan-mujagic!) [[PR-3466](https://github.com/meetecho/janus-gateway/pull/3466)] +- New programmatic API to ask for keyframes in SIP and NoSIP plugins [[PR-3517](https://github.com/meetecho/janus-gateway/pull/3517)] +- Fixed missing libcurl linking in TextRoom plugin +- Added support for private recordings in Record&Play [[PR-3518](https://github.com/meetecho/janus-gateway/pull/3518)] +- Fixed leak in recorder when adding descriptions (thanks @m08pvv!) [[PR-3487](https://github.com/meetecho/janus-gateway/pull/3487)] +- Fixed WebSocket transport binding to the wrong IP address in particular setups [[Issue-3500](https://github.com/meetecho/janus-gateway/issues/3550)] +- Improve DTX detection in janus-pp-rec [[PR-3488](#3488)] +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.3.0] - 2024-11-25 + +- Refactored logging internals [[PR-3428](https://github.com/meetecho/janus-gateway/pull/3428)] +- Use strtok to parse SDPs [[PR-3424](https://github.com/meetecho/janus-gateway/pull/3424)] +- Fixed rare condition that could lead to a deadlock in the VideoRoom [[PR-3446](https://github.com/meetecho/janus-gateway/pull/3446)] +- Fixed broken switch when using remote publishers in VideoRoom [[PR-3447](https://github.com/meetecho/janus-gateway/pull/3447)] +- Added SRTP support to VideoRoom remote publishers (thanks @spscream!) [[PR-3449](https://github.com/meetecho/janus-gateway/pull/3449)] +- Added support for generic JSON metadata to VideoRoom publishers (thanks @spscream!) [[PR-3467](https://github.com/meetecho/janus-gateway/pull/3467)] +- Fixed deadlock in VideoRoom when failing to open a socket for a new RTP forwarder (thanks @spscream!) [[PR-3468](https://github.com/meetecho/janus-gateway/pull/3468)] +- Fixed deadlock in VideoRoom caused by reverse ordering of mutex locks [[PR-3474](https://github.com/meetecho/janus-gateway/pull/3474)] +- Fixed memory leaks when using remote publishers in VideoRoom [[PR-3475](https://github.com/meetecho/janus-gateway/pull/3475)] +- Diluted frequency of PLI in the VideoRoom (thanks @natikaltura!) [[PR-3423](https://github.com/meetecho/janus-gateway/pull/3423)] +- Better cleanup after failed mountpoint creations in Streaming plugin [[PR-3465](https://github.com/meetecho/janus-gateway/pull/3465)] +- Fixed compilation of AudioBridge in case libogg isn't available (thanks @tmatth!) [[PR-3438](https://github.com/meetecho/janus-gateway/pull/3438)] +- Better management of call cleanup in SIP plugin [[Issue-3430](https://github.com/meetecho/janus-gateway/issues/3430)] +- Change the way call-IDs are tracked in the SIP plugin (thanks WebTrit!) [[PR-3443](https://github.com/meetecho/janus-gateway/pull/3443)] +- Increased maximum size of custom SIP headers [[Issue-3459](https://github.com/meetecho/janus-gateway/issues/3459)] +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.2.4] - 2024-09-10 + +- Limit number of SDP lines when parsing (workaround for OSS-Fuzz issue) [[PR-3414](https://github.com/meetecho/janus-gateway/pull/3414)] +- Normalized monotonic time to Janus start +- Added documentation for remote publishers feature in VideoRoom (SFU cascading) +- Added PLC (packet loss concealment) support to the AudioBridge (thanks @spscream!) [[PR-3349](https://github.com/meetecho/janus-gateway/pull/3349)] +- Cleanup participant queues when muted in the AudioBridge [[PR-3368](https://github.com/meetecho/janus-gateway/pull/3368)] +- Added "listannouncements" request to the AudioBridge (thanks @keremcadirci!) [[PR-3391](https://github.com/meetecho/janus-gateway/pull/3391)] +- Use sequence numbers instead of timestamps for the jitter buffer in the AudioBridge [[PR-3406](https://github.com/meetecho/janus-gateway/pull/3406)] +- Fixed event handers for SIP plugin when using Sofia SIP >= 1.13 (thanks @ ycherniavskyi!) [[PR-3386](https://github.com/meetecho/janus-gateway/pull/3386)] +- Fixed management of data buffering in Streaming plugin [[PR-3412](https://github.com/meetecho/janus-gateway/pull/3412)] +- Fixed small leak in Lua and Duktape plugins [[PR-3409](https://github.com/meetecho/janus-gateway/pull/3409)] +- Fixed recvonly m-lines not being added to SDP in janus.js when offering +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.2.3] - 2024-06-20 + +- Reduced size of RTP header struct in core +- Added support for helper threads to VideoRoom [[PR-3067]((https://github.com/meetecho/janus-gateway/pull/3067)] +- Fixed rare race condition in VideoRoom when destroying rooms [[PR-3361]((https://github.com/meetecho/janus-gateway/pull/3361)] +- Fixed rare crash in VideoRoom when using SVC +- Added optional RNNoise support to AudioBridge [[PR-3185]((https://github.com/meetecho/janus-gateway/pull/3185)] +- Handle jitter buffer delay manually in AudioBridge [[PR-3353]((https://github.com/meetecho/janus-gateway/pull/3353)] +- Fixed rare segfault when changing rooms in AudioBridge [[PR-3356]((https://github.com/meetecho/janus-gateway/pull/3356)] +- Empty queues in AudioBridge when muting status changes [[PR-3368]((https://github.com/meetecho/janus-gateway/pull/3368)] +- Fixed rare deadlock in AudioBridge plugin when closing connections [[PR-3387]((https://github.com/meetecho/janus-gateway/pull/3387)] +- Fixed compilation errors on MacOS for HTTP transport plugin [[Issue-3366]((https://github.com/meetecho/janus-gateway/issues/3366)] +- Fixed missing '--version' command line switch (thanks @fancycode!) [[PR-3384]((https://github.com/meetecho/janus-gateway/pull/3384)] +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.2.2] - 2024-04-02 + +* Update demos and docs to Bootstrap 5.x [[PR-3300](https://github.com/meetecho/janus-gateway/pull/3300)] +* Fixed rare race condition in VideoRoom [[PR-3331](https://github.com/meetecho/janus-gateway/pull/3331)] +* Fixed broken end-to-end encryption for subscribers in VideoRoom +* Fixed ports leak when using remote publishers in VideoRoom plugin [[Issue-3345](https://github.com/meetecho/janus-gateway/issues/3345)] +* Perform audio-level detection in AudioBridge participant thread [[PR-3312](https://github.com/meetecho/janus-gateway/pull/3312)] +* Fixed memory leak in AudioBridge in case of late packets +* Ship speexdsp's jitter buffer as part of local AudioBridge dependencies [[PR-3348](https://github.com/meetecho/janus-gateway/pull/3348)] +* Add support of abs-capture-time RTP extension to Streaming plugin (thanks @IbrayevRamil!) [[PR-3291](https://github.com/meetecho/janus-gateway/pull/3291)] +* Don't call close_pc in SIP plugin if there was no SDP [[PR-3339](https://github.com/meetecho/janus-gateway/pull/3339)] +* Fixed broken faststart when postprocessing AV1 recordings (thanks @corthiclem!) [[PR-3317](https://github.com/meetecho/janus-gateway/pull/3317)] +* Added new connectionState callback to janus.js (thanks @RSATom!) [[PR-3343](https://github.com/meetecho/janus-gateway/pull/3343)] +* Exposed Janus and Admin API ping request via GET [[Issue-3336](https://github.com/meetecho/janus-gateway/issues/3336)] +* Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.2.1] - 2023-12-06 + +* Added support for abs-capture-time RTP extension [[PR-3161](https://github.com/meetecho/janus-gateway/pull/3161)] +* Fixed truncated label in datachannels (thanks @veeting!) [[PR-3265](https://github.com/meetecho/janus-gateway/pull/3265)] +* Support larger values for SDP attributes (thanks @petarminchev!) [[PR-3282](https://github.com/meetecho/janus-gateway/pull/3282)] +* Fixed rare crash in VideoRoom plugin (thanks @tmatth!) [[PR-3259](https://github.com/meetecho/janus-gateway/pull/3259)] +* Don't create VideoRoom subscriptions to publisher streams with no associated codecs +* Added suspend/resume participant API to AudioBridge [[PR-3301](https://github.com/meetecho/janus-gateway/pull/3301)] +* Fixed rare crash in AudioBridge +* Fixed rare crash in Streaming plugin when doing ICE restarts [[Issue-3288](https://github.com/meetecho/janus-gateway/issues/3288)] +* Allow SIP and NoSIP plugins to bind media to a specific address (thanks @pawnnail!) [[PR-3263](https://github.com/meetecho/janus-gateway/pull/3263)] +* Removed advertised support for SIP UPDATE in SIP plugin +* Parse RFC2833 DTMF to custom events in SIP plugin (thanks @ywmoyue!) [[PR-3280](https://github.com/meetecho/janus-gateway/pull/3280)] +* Fixed missing Contact header in some dialogs in SIP plugin (thanks @ycherniavskyi!) [[PR-3286](https://github.com/meetecho/janus-gateway/pull/3286)] +* Properly set mid when notifying about ended tracks in janus.js +* Fixed broken restamping in janus-pp-rec +* Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.2.0] - 2023-08-09 + +- Added support for VP9/AV1 simulcast, and fixed broken AV1/SVC support [[PR-3218](https://github.com/meetecho/janus-gateway/pull/3218)] +- Fixed RTCP out quality stats [[PR-3228](https://github.com/meetecho/janus-gateway/pull/3228)] +- Default link quality stats to 100 +- Added support for ICE consent freshness [[PR-3234](https://github.com/meetecho/janus-gateway/pull/3234)] +- Fixed rare race condition in VideoRoom [[PR-3219](https://github.com/meetecho/janus-gateway/pull/3219)] [[PR-3247](https://github.com/meetecho/janus-gateway/pull/3247)] +- Use speexdsp's jitter buffer in the AudioBridge [[PR-3233](https://github.com/meetecho/janus-gateway/pull/3233)] +- Fixed crash in Streaming plugin on mountpoints with too many streams [[Issue-3225](https://github.com/meetecho/janus-gateway/issues/3225)] +- Support for batched configure requests in Streaming plugin (thanks @petarminchev!) [[PR-3239](https://github.com/meetecho/janus-gateway/pull/3239)] +- Fixed rare deadlock in Streamin plugin [[PR-3250](https://github.com/meetecho/janus-gateway/pull/3250)] +- Fix simulated leave message for longer string ID rooms in TextRoom (thanks @adnanel!) [PR-3243](https://github.com/meetecho/janus-gateway/pull/3243)] +- Notify about count of sessions, handles and PeerConnections on a regular basis, when event handlers are enabled [[PR-3221](https://github.com/meetecho/janus-gateway/pull/3221)] +- Fixed broken Insertable Streams for recvonly streams when answering in janus.js +- Added background selector and blur support to Virtual Background demo +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.1.4] - 2023-05-19 + +- Moved discussions from Google Group to Discourse +- Fixed typo in command line argument validation +- Refactored RTP forwarder internals as a core feature [[PR-3155](https://github.com/meetecho/janus-gateway/pull/3155)] +- Refactored SVC processing as a core feature, and removed deprecated VP9/SVC demo [[PR-3174](https://github.com/meetecho/janus-gateway/pull/3174)] +- Don't create IPv6 sockets if IPv6 is completely disabled [[PR-3179](https://github.com/meetecho/janus-gateway/pull/3179)] +- Fixed some VideoRoom race conditions [[PR-3167](https://github.com/meetecho/janus-gateway/pull/3167)] +- Added simulcast/SVC params to switch in VideoRoom (thanks @brave44!) [[PR-3197](https://github.com/meetecho/janus-gateway/pull/3197)] +- Add support for receiving offers in Streaming plugin (for WHEP) [[PR-3199](https://github.com/meetecho/janus-gateway/pull/3199)] +- Add newline for SIP headers that are overflown in length (thanks @zayim!) [[PR-3184](https://github.com/meetecho/janus-gateway/pull/3184)] +- Save SIP reason state on multiple callbacks (thanks @kenangenjac!) [[PR-3210](https://github.com/meetecho/janus-gateway/pull/3210)] +- Avoid parsing whitespace as invalid JSON when receiving WebSocket messages (thanks @htrendev!) [[PR-3208](https://github.com/meetecho/janus-gateway/pull/3208)] +- Remove old tracks before adding/replacing new ones in janus.js [[PR-3203](https://github.com/meetecho/janus-gateway/pull/3203)] +- Tweaks to some janus.js internals (thanks @i8-pi!) [[PR-3211](https://github.com/meetecho/janus-gateway/pull/3211)] +- Fixed some typos and added some tweaks to Admin API demo +- Refactored npm version of janus.js +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + +## [v1.1.3] - 2023-03-06 + +- Use getaddrinfo instead of gethostbyname [[PR-3159](https://github.com/meetecho/janus-gateway/pull/3159)] +- Removed VoiceMail plugin and demo [[PR-3172](https://github.com/meetecho/janus-gateway/pull/3172)] +- Added configurable cap to number of queued events when reconnecting WebSocket event handler [[PR-3148](https://github.com/meetecho/janus-gateway/pull/3148)] +- Fixed broken support for text datachannels in Streaming plugin +- Add option to manually insert SPS/PPS RTP packets for H.264 mountpoints [[PR-3168](https://github.com/meetecho/janus-gateway/pull/3168)] +- Fixed From/To checks when getting a SIP INVITE [[Issue-3164](https://github.com/meetecho/janus-gateway/issues/3164)] +- Allow changing mjrs dir also when stopping recordings in AudioBridge [[Issue-3171](https://github.com/meetecho/janus-gateway/issues/3171)] +- Allow Lua and Duktape plugins to relay extensions when relaying RTP packets [[PR-3162](https://github.com/meetecho/janus-gateway/pull/3162)] +- Optionally support X-Forwarded-For in both HTTP and WebSocket transports [[PR-3160](https://github.com/meetecho/janus-gateway/pull/3160)] +- Add reason of track being added/removed in onremotetrack in janus.js (thanks @marekpiechut!) [[PR-3150](https://github.com/meetecho/janus-gateway/pull/3150)] +- Fixed broken VP9-SVC demo room [[Issue-3169](https://github.com/meetecho/janus-gateway/issues/3169)] +- Linted whole JS demo codebase [[PR-3170](https://github.com/meetecho/janus-gateway/pull/3170)] +- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) + ## [v1.1.2] - 2023-01-17 - Always add mid to the SDP, even for disabled m-lines diff --git a/Makefile.am b/Makefile.am index c93959ecfe..9d4daa23f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,7 @@ demosdir = $(datadir)/janus/demos demos_DATA = $(NULL) jsmodulesdir = $(datadir)/janus/javascript -jsmodules_DATA = html/janus.js +jsmodules_DATA = html/demos/janus.js %.sample: %.sample.in $(MKDIR_P) $(@D) @@ -46,6 +46,16 @@ EXTRA_DIST += conf/janus.jcfg.sample.in CLEANFILES += conf/janus.jcfg.sample +## +# pkg-config file +## + +EXTRA_DIST = janus-gateway.pc.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = janus-gateway.pc +DISTCLEANFILES = janus-gateway.pc + + ## # Fuzzers checking ## @@ -72,30 +82,30 @@ endif ## if ENABLE_JAVASCRIPT_ES_MODULE -jsmodules_DATA += npm/bundles/janus.es.js +jsmodules_DATA += npm/dist/janus.es.js endif if ENABLE_JAVASCRIPT_UMD_MODULE -jsmodules_DATA += npm/bundles/janus.umd.js +jsmodules_DATA += npm/dist/janus.umd.js endif if ENABLE_JAVASCRIPT_IIFE_MODULE -jsmodules_DATA += npm/bundles/janus.iife.js +jsmodules_DATA += npm/dist/janus.iife.js endif if ENABLE_JAVASCRIPT_COMMON_JS_MODULE -jsmodules_DATA += npm/bundles/janus.cjs.js +jsmodules_DATA += npm/dist/janus.cjs.js endif EXTRA_DIST += $(jsmodules_DATA) if ENABLE_JAVASCRIPT_MODULES -npm/node_modules/rollup/bin/rollup: npm/package.json - cd npm && $(NPM) install && touch node_modules/rollup/bin/rollup +node_modules/rollup/dist/bin/rollup: package.json + $(NPM) install && touch node_modules/rollup/dist/bin/rollup -npm/bundles/janus.%.js: html/janus.js npm/node_modules/rollup/bin/rollup npm/rollup.config.js npm/module.js - cd npm && $(NPM) run rollup -- --o $(patsubst npm/%,%,$@) --f $* +npm/dist/janus.%.js: html/demos/janus.js node_modules/rollup/dist/bin/rollup npm/rollup.config.mjs npm/module.js + $(NPM) run rollup -- --o $@ --f $* endif diff --git a/README.md b/README.md index 1723dafaeb..aea2520e8c 100644 --- a/README.md +++ b/README.md @@ -11,40 +11,41 @@ For some online demos and documentations, make sure you pay the [project website > **Note well:** this is the main branch for the `multistream` version of Janus, which is the new version. If you want to check the legacy version of Janus instead (i.e., `0.x`, a.k.a. "legacy") click [here](https://github.com/meetecho/janus-gateway/tree/0.x) instead. -If you have questions on Janus, or wish to discuss Janus with us and other users, please join our [meetecho-janus](https://groups.google.com/forum/#!forum/meetecho-janus) Google Group. If you encounter bugs, please submit an issue on [GitHub](https://github.com/meetecho/janus-gateway/issues): make sure you read the [guidelines](.github/CONTRIBUTING.md) before opening an issue or a pull request, though. +If you have questions on Janus, or wish to discuss Janus with us and other users, please join our [Community](https://janus.discourse.group/). If you encounter bugs, please submit an issue on [GitHub](https://github.com/meetecho/janus-gateway/issues): make sure you read the [guidelines](.github/CONTRIBUTING.md) before opening an issue or a pull request, though. ## Dependencies To install it, you'll need to satisfy the following dependencies: -* [Jansson](http://www.digip.org/jansson/) +* [GLib](https://docs.gtk.org/glib/) +* [zlib](https://zlib.net/) +* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) +* [Jansson](https://github.com/akheron/jansson) * [libconfig](https://hyperrealm.github.io/libconfig/) * [libnice](https://libnice.freedesktop.org/) (at least v0.1.16 suggested, v0.1.18 recommended) -* [OpenSSL](http://www.openssl.org/) (at least v1.0.1e) +* [OpenSSL](https://www.openssl.org/) (at least v1.0.1e) * [libsrtp](https://github.com/cisco/libsrtp) (at least v2.x suggested) + +These are optional dependencies, depending on which features you're interested in: + * [usrsctp](https://github.com/sctplab/usrsctp) (only needed if you are interested in Data Channels) -* [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd/) (at least v0.9.59; only needed if you are interested in REST support for the Janus API) -* [libwebsockets](https://libwebsockets.org/) (only needed if you are interested in WebSockets support for the Janus API) -* [cmake](http://www.cmake.org/) (only needed if you are interested in WebSockets and/or BoringSSL support, as they make use of it) +* [libmicrohttpd](https://www.gnu.org/software/libmicrohttpd/) (at least v0.9.59; only needed if you are interested in REST support for the Janus API) +* [libwebsockets](https://libwebsockets.org/) (at least v4.x suggested; only needed if you are interested in WebSockets support for the Janus API) +* [cmake](https://www.cmake.org/) (only needed if you are interested in WebSockets and/or BoringSSL support, as they make use of it) * [rabbitmq-c](https://github.com/alanxz/rabbitmq-c) (only needed if you are interested in RabbitMQ support for the Janus API or events) * [paho.mqtt.c](https://eclipse.org/paho/clients/c) (only needed if you are interested in MQTT support for the Janus API or events) * [nanomsg](https://nanomsg.org/) (only needed if you are interested in Nanomsg support for the Janus API) * [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are interested in the TURN REST API support) -A couple of plugins depend on a few more libraries: +A couple of plugins depend on a few more libraries (you only need to install the ones for the plugins you need): * [Sofia-SIP](https://github.com/freeswitch/sofia-sip) (only needed for the SIP plugin) -* [libopus](http://opus-codec.org/) (only needed for the AudioBridge plugin) -* [libogg](http://xiph.org/ogg/) (needed for the VoiceMail plugin and/or post-processor, and optionally AudioBridge and Streaming plugins) +* [libopus](https://opus-codec.org/) (only needed for the AudioBridge plugin) +* [libogg](https://xiph.org/ogg/) (needed for the recordings post-processor, and optionally AudioBridge and Streaming plugins) * [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are interested in RTSP support in the Streaming plugin or in the sample Event Handler plugin) * [Lua](https://www.lua.org/download.html) (only needed for the Lua plugin) * [Duktape](https://duktape.org/) (only needed for the Duktape plugin) -Additionally, you'll need the following libraries and tools: - -* [GLib](http://library.gnome.org/devel/glib/) -* [zlib](https://zlib.net/) -* [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/) All of those libraries are usually available on most of the most common distributions. Installing these libraries on a recent Fedora, for instance, is very simple: @@ -57,12 +58,12 @@ Notice that you may have to `yum install epel-release` as well if you're attempt On Ubuntu or Debian, it would require something like this: - aptitude install libmicrohttpd-dev libjansson-dev \ - libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \ + apt install libmicrohttpd-dev libjansson-dev \ + libssl-dev libsofia-sip-ua-dev libglib2.0-dev \ libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \ libconfig-dev pkg-config libtool automake -* *Note:* please notice that libopus may not be available out of the box on your distro. In that case, you'll have to [install it manually](http://www.opus-codec.org). +* *Note:* please notice that libopus may not be available out of the box on your distro. In that case, you'll have to [install it manually](https://www.opus-codec.org). While `libnice` is typically available in most distros as a package, the version available out of the box in Ubuntu is known to cause problems. As such, we always recommend manually compiling and installing the master version of libnice. To build libnice, you need Python 3, Meson and Ninja: @@ -75,7 +76,7 @@ To build libnice, you need Python 3, Meson and Ninja: In case you're interested in compiling the sample Event Handler plugin, you'll need to install the development version of libcurl as well (usually `libcurl-devel` on Fedora/CentOS, `libcurl4-openssl-dev` on Ubuntu/Debian). -If your distro ships a pre-1.5 version of libsrtp, you'll have to uninstall that version and [install 1.5.x, 1.6.x or 2.x manually](https://github.com/cisco/libsrtp/releases). In fact, 1.4.x is known to cause several issues with WebRTC. While 1.5.x is supported, we recommend installing 2.x instead Notice that the following steps are for version 2.2.0, but there may be more recent versions available: +If your distro ships a pre-1.5 version of libsrtp, you'll have to uninstall that version and [install 1.5.x, 1.6.x or 2.x manually](https://github.com/cisco/libsrtp/releases). In fact, 1.4.x is known to cause several issues with WebRTC. While 1.5.x is supported, we recommend installing 2.x instead. Notice that the following steps are for version 2.2.0, but there may be more recent versions available: wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz tar xfv v2.2.0.tar.gz @@ -98,18 +99,14 @@ If you want to make use of BoringSSL instead of OpenSSL (e.g., because you want # Build mkdir -p build cd build - cmake -DCMAKE_CXX_FLAGS="-lrt" .. + cmake -DCMAKE_INSTALL_PREFIX=/opt/boringssl -DCMAKE_CXX_FLAGS="-lrt" .. make - cd .. - # Install - sudo mkdir -p /opt/boringssl - sudo cp -R include /opt/boringssl/ - sudo mkdir -p /opt/boringssl/lib - sudo cp build/ssl/libssl.a /opt/boringssl/lib/ - sudo cp build/crypto/libcrypto.a /opt/boringssl/lib/ + sudo make install Once the library is installed, you'll have to pass an additional `--enable-boringssl` flag to the configure script, as by default Janus will be built assuming OpenSSL will be used. By default, Janus expects BoringSSL to be installed in `/opt/boringssl` -- if it's installed in another location, pass the path to the configure script as such: `--enable-boringssl=/path/to/boringssl` If you were using OpenSSL and want to switch to BoringSSL, make sure you also do a `make clean` in the Janus folder before compiling with the new BoringSSL support. If you enabled BoringSSL support and also want Janus to detect and react to DTLS timeouts with faster retransmissions, then pass `--enable-dtls-settimeout` to the configure script too. +* *Note:* as explained in [this issue](https://github.com/meetecho/janus-gateway/issues/3456), building Janus with more recent versions of BoringSSL may require you to pass a `CCLD=c++` for any `make` command to build Janus itself. + For what concerns usrsctp, which is needed for Data Channels support, it is usually not available in repositories, so if you're interested in them (support is optional) you'll have to install it manually. It is a pretty easy and standard process: git clone https://github.com/sctplab/usrsctp @@ -163,8 +160,8 @@ Finally, the same can be said for rabbitmq-c as well, which is needed for the op To conclude, should you be interested in building the Janus documentation as well, you'll need some additional tools too: -* [Doxygen](http://www.doxygen.org) -* [Graphviz](http://www.graphviz.org/) +* [Doxygen](https://www.doxygen.org) +* [Graphviz](https://www.graphviz.org/) On Fedora: @@ -288,8 +285,6 @@ or on the command line: (experimental) (default=off) -O, --ipv6-link-local Whether IPv6 link-local candidates should be gathered as well (default=off) - -l, --libnice-debug Whether to enable libnice debugging or not - (default=off) -f, --full-trickle Do full-trickle instead of half-trickle (default=off) -I, --ice-lite Whether to enable the ICE Lite mode or not diff --git a/bower.json b/bower.json index 9309211f2c..f221f3b1a1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "janus-gateway", - "version": "1.1.2", + "version": "1.4.0", "homepage": "https://github.com/meetecho/janus-gateway", "authors": [ "Lorenzo Miniero ", @@ -33,6 +33,6 @@ "tests" ], "dependencies": { - "webrtc-adapter": "8.2.0" + "webrtc-adapter": "9.0.3" } } diff --git a/conf/janus.eventhandler.sampleevh.jcfg.sample b/conf/janus.eventhandler.sampleevh.jcfg.sample index d32b7a5554..9d6aaec30e 100644 --- a/conf/janus.eventhandler.sampleevh.jcfg.sample +++ b/conf/janus.eventhandler.sampleevh.jcfg.sample @@ -12,7 +12,7 @@ general: { grouping = true # Whether events should be sent individually (one per # HTTP POST, JSON object), or if it's ok to group them # (one or more per HTTP POST, JSON array with objects) - # The default is 'yes' to limit the number of connections. + # The default is 'true' to limit the number of connections. json = "indented" # Whether the JSON messages should be indented (default), # plain (no indentation) or compact (no indentation and no spaces) diff --git a/conf/janus.eventhandler.wsevh.jcfg.sample b/conf/janus.eventhandler.wsevh.jcfg.sample index c5cc364ca4..7bdf9c8a69 100644 --- a/conf/janus.eventhandler.wsevh.jcfg.sample +++ b/conf/janus.eventhandler.wsevh.jcfg.sample @@ -23,6 +23,28 @@ general: { backend = "ws://your.websocket.here" # subprotocol = "your-subprotocol" + # If the WebSocket server isn't reachable or the client has + # to reconnect, the default behaviour of the handler plugin + # is to retry with an exponential back-off, all while buffering + # events that Janus may keep on pushing. Buffering has no + # limit, so if reconnecting takes a long time (or forever) + # memory usage will keep on growing; besides, it may cause + # a network spike when eventually reconnected, as all stored + # events would need to be sent to the backend before new + # ones can be relayed as well. You can prune queued events + # and put a cap on the amount of buffering to perform when + # reconnecting by setting the 'events_cap_on_reconnect' + # property accordingly: any number you set will be the + # maximum number of events stored in memory until we + # reconnect, which means older packets will be discarded + # if the cap is exceeded. Notice that setting a value + # of 0 will not mean "drop all packets", but will disable + # the cap (default behaviour), which means the minimum + # possible value is 1. Also notice that, when the cap is + # enabled, this means the event receiver may end up missing key + # events when a reconnection actually ends up taking place. + # events_cap_on_reconnect = 10 + # In case you need to debug connection issues, you can configure # the libwebsockets debugging level as a comma separated list of things # to debug, supported values: err, warn, notice, info, debug, parser, diff --git a/conf/janus.jcfg.sample.in b/conf/janus.jcfg.sample.in index c628b87a36..e13ac47064 100644 --- a/conf/janus.jcfg.sample.in +++ b/conf/janus.jcfg.sample.in @@ -14,6 +14,10 @@ general: { #log_to_stdout = false # Whether the Janus output should be written # to stdout or not (default=true) #log_to_file = "/path/to/janus.log" # Whether to use a log file or not + #log_rotate_sig = "SIGUSR1" # Signal to handle for log rotation, valid values + # are "SIGUSR1" and "SIGHUP". + # Default is no setting, which disables the + # signal handler for log rotation. debug_level = 4 # Debug/logging level, valid values are 0-7 #debug_timestamps = true # Whether to show a timestamp for each log line #debug_colors = false # Whether colors should be disabled in the log @@ -270,26 +274,37 @@ media: { # it should work in ICE-Lite mode (by default it doesn't). If libnice is # at least 0.1.15, you can choose which ICE nomination mode to use: valid # values are "regular" and "aggressive" (the default depends on the libnice -# version itself; if we can set it, we set aggressive nomination). You can -# also configure whether to use connectivity checks as keep-alives, which +# version itself; if we can set it, we set aggressive nomination). If +# libnice is at least 0.1.19, you can enable consent freshness checks for +# PeerConnections as well: this will issue regular checks to check whether +# or not the WebRTC peer isn't available anymore. Enabling consent freshness +# will automatically also enable using connectivity checks as keep-alives, which # might help detecting when a peer is no longer available (notice that # current libnice master is breaking connections after 50 seconds when # keepalive-conncheck is being used, so if you want to use it, better # sticking to 0.1.18 until the issue is addressed upstream). Finally, # you can also enable ICE-TCP support (beware that this may lead to problems # if you do not enable ICE Lite as well), choose which interfaces should -# be used for gathering candidates, and enable or disable the -# internal libnice debugging, if needed. +# be used for gathering candidates. nat: { #stun_server = "stun.voip.eutelia.it" #stun_port = 3478 - nice_debug = false + #nice_debug = "nice_debug option is NOT SUPPORTED ANYMORE! Please set NICE_DEBUG and G_MESSAGES_DEBUG env vars when starting Janus" #full_trickle = true #ice_nomination = "regular" + #ice_consent_freshness = true #ice_keepalive_conncheck = true #ice_lite = true #ice_tcp = true + # By default, Janus implements a grace period when detecting ICE + # failures in PeerConnections, to give time to applications to react + # to that, e.g., by enforcing an ICE restart. If you want an ICE + # failure to result in the PeerConnection being closed right away + # (e.g., with the help of consent freshness) then you can do that + # by uncommenting the following property and set it to true + #hangup_on_failed = true + # By default Janus tries to resolve mDNS (.local) candidates: even # though this is now done asynchronously and shouldn't keep the API # busy, even in case mDNS resolution takes a long time to timeout, @@ -401,7 +416,7 @@ nat: { # names to identify the plugins to disable. By default all available # plugins are enabled and loaded at startup. plugins: { - #disable = "libjanus_voicemail.so,libjanus_recordplay.so" + #disable = "libjanus_echotest.so,libjanus_recordplay.so" } # You can choose which of the available transports should be enabled or @@ -425,12 +440,12 @@ loggers: { # Event handlers allow you to receive live events from Janus happening # in core and/or plugins. Since this can require some more resources, -# the feature is disabled by default. Setting broadcast to yes will +# the feature is disabled by default. Setting 'broadcast' to 'true' will # enable them. You can then choose which of the available event handlers # should be loaded or not. Use the 'disable' directive to prevent Janus # from loading one or more event handlers: use a comma separated list of # file names to identify the event handlers to disable. By default, if -# broadcast is set to yes all available event handlers are enabled and +# broadcast is set to 'true' all available event handlers are enabled and # loaded at startup. Finally, you can choose how often media statistics # (packets sent/received, losses, etc.) should be sent: by default it's # once per second (audio and video statistics sent separately), but may @@ -441,7 +456,7 @@ loggers: { # not other media-related events). By default Janus sends single media # statistic events per media (audio, video and simulcast layers as separate # events): if you'd rather receive a single containing all media stats in a -# single array, set 'combine_media_stats' to true. +# single array, set 'combine_media_stats' to 'true'. events: { #broadcast = true #combine_media_stats = true diff --git a/conf/janus.plugin.audiobridge.jcfg.sample b/conf/janus.plugin.audiobridge.jcfg.sample index 39d41d5a55..f5d3f1976a 100644 --- a/conf/janus.plugin.audiobridge.jcfg.sample +++ b/conf/janus.plugin.audiobridge.jcfg.sample @@ -10,9 +10,9 @@ # audiolevel_event = true|false (whether to emit event to other users or not, default=false) # audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds) # audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25) -# default_prebuffering = number of packets to buffer before decoding each particiant (default=6) -# default_expectedloss = percent of packets we expect participants may miss, to help with FEC (default=0, max=20; automatically used for forwarders too) +# default_expectedloss = percent of packets we expect participants may miss, to help with outgoing FEC (default=0, max=20; automatically used for forwarders too) # default_bitrate = default bitrate in bps to use for the all participants (default=0, which means libopus decides; automatically used for forwarders too) +# denoise = true|false (whether denoising via RNNoise should be performed for each participant by default) # record = true|false (whether this room should be recorded, default=false) # record_file = "/path/to/recording.wav" (where to save the recording) # record_dir = "/path/to/" (path to save the recording to, makes record_file a relative path if provided) diff --git a/conf/janus.plugin.recordplay.jcfg.sample.in b/conf/janus.plugin.recordplay.jcfg.sample.in index a15d1b6c31..cd4278c92d 100644 --- a/conf/janus.plugin.recordplay.jcfg.sample.in +++ b/conf/janus.plugin.recordplay.jcfg.sample.in @@ -1,7 +1,14 @@ # path = where to place recordings in the file system +# admin_key = plugin management secret; if set, private recordings can +# be listed only if this key is provided in the request +# private = true|false, whether recordings should be marked as private by +# default, meaning they're not returned to users connecting to the +# plugin unless they provide the right 'admin_key' in the request # events = true|false, whether events should be sent to event handlers general: { path = "@recordingsdir@" + #admin_key = "supersecret" + #private = true #events = false } diff --git a/conf/janus.plugin.streaming.jcfg.sample.in b/conf/janus.plugin.streaming.jcfg.sample.in index c9d08ce887..8bc699121a 100644 --- a/conf/janus.plugin.streaming.jcfg.sample.in +++ b/conf/janus.plugin.streaming.jcfg.sample.in @@ -1,3 +1,14 @@ +# You can configure static mountpoints that should be made available +# when Janus starts in this configuration file. The syntax and the +# available properties are listed below. Notice that, for the sake of +# simplicity, only the global and legacy properties are listed in the +# following text: you can use the new stream-based syntax as well (see +# the 'multistream-test' example below for reference), but in that case +# all properties whose names start with audio/video/data should be +# renamed to have that prefix removed. Please refer to the Streaming +# plugin documentation for more details, as the static configuration +# in that case mirrors the dynamic API syntax. +# # stream-name: { # type = rtp|live|ondemand|rtsp # rtp = stream originated by an external tool (e.g., gstreamer or @@ -36,14 +47,15 @@ # videoiface = network interface or IP address to bind to, if any (binds to all otherwise) # videopt =