# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both.
# Use only 'javascript-typescript' to analyze code written in JavaScript,
# TypeScript or both.
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support.
env:
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD:'true'
...
...
@@ -50,11 +51,13 @@ jobs:
uses:github/codeql-action/init@v3
with:
languages:${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# If you wish to specify custom queries, you can do so here or in a
# config file. By default, queries listed here will override any
# specified in a config file. Prefix the list here with "+" to use
When creating a Pull Request for mediasoup, ensure that you run the following commands to verify that the code in your PR conforms to the code syntax of the project and does not break existing funtionality:
When creating a Pull Request for mediasoup:
*`npm run lint`: Check JavaScript and C++ linting rules.
*`npm run typescript:build`: Compile TypeScript code (under `src/` folder) into JavaScript code (under `lib/` folder).
*`npm run test`: Run JavaScript and C++ test units.
- Ensure that changes/additions done in TypeScript files (in `node/src` folder) are also applied to the Rust layer (in `rust` folder), and vice-versa.
- Test units must be added for both Node.js and Rust.
- Changes/additions in C++ code may need tests in `worker/test` folder.
The full list of `npm` scripts (and `make` tasks) is available in the [doc/Building.md](/doc/Building.md) file.
Once all changes are done, run the following commands to verify that the code in your PR conforms to the code syntax of the project, it does not break existing funtionality and tests pass:
Once all these commands succeed, wait for the Travis CI checks to complete and verify they run successfully (otherwise the PR won't be accepted).
-`npm run lint`: Check TypeScript and C++ linting rules. Formating errors can be automatically fixed by running `npm run format`.
-`npm run typescript:build`: Compile TypeScript code (under `src` folder) into JavaScript code (under `lib` folder).
-`npm run test`: Run JavaScript and C++ test units.
- Instead, you can run `npm run release:check` which will run all those steps.
-`cargo fmt`, `cargo clippy` and `cargo test` to ensure that everything is good in Rust side.
The full list of `npm` scripts, `invoke` tasks and `cargo` commands is available in the [doc/Building.md](/doc/Building.md) file.
## Coding Style
In adition to automatic checks performed by commands above, we also enforce other minor things related to coding style:
### Comments in JavaScript and C++
### Comments in TypeScript and C++
We use `//` for inline comments in both JavaScript and C++ source files.
* Comments must start with upercase letter.
* Comments must not exceed 80 columns (split into different lines if necessary).
* Comments must end with a dot.
- Comments must start with upercase letter.
- Comments must not exceed 80 columns (split into different lines if necessary).
- Comments must end with a dot.
Example (good):
```js
```ts
// Calculate foo based on bar value.
constfoo=bar/2;
```
Example (bad):
```js
```ts
// calculate foo based on bar value
constfoo=bar/2;
```
When adding inline documentation for methods or functions, we use `/** */` syntax. Example:
mediasoup and its client side libraries are designed to accomplish with the following goals:
* Be a [SFU](https://webrtcglossary.com/sfu/)(Selective Forwarding Unit).
* Support both WebRTC and plain RTP input and output.
* Be a Node.js module/Rust crate in server side.
* Be a tiny JavaScript and C++ libraries in client side.
* Be minimalist: just handle the media layer.
* Be signaling agnostic: do not mandate any signaling protocol.
* Be super low level API.
* Support all existing WebRTC endpoints.
* Enable integration with well known multimedia libraries/tools.
- Be a [SFU](https://webrtcglossary.com/sfu)(Selective Forwarding Unit).
- Support both WebRTC and plain RTP input and output.
- Be a Node.js module or Rust crate in server side.
- Be a tiny TypeScript and C++ libraries in client side.
- Be minimalist: just handle the media layer.
- Be signaling agnostic: do not mandate any signaling protocol.
- Be super low level API.
- Support all existing WebRTC endpoints.
- Enable integration with well known multimedia libraries/tools.
## Architecture
![][mediasoup-architecture]
## Use Cases
mediasoup and its client side libraries provide a super low level API. They are intended to enable different use cases and scenarios, without any constraint or assumption. Some of these use cases are:
* Group video chat applications.
* One-to-many (or few-to-many) broadcasting applications in real-time.
* RTP streaming.
- Group video chat applications.
- One-to-many (or few-to-many) broadcasting applications in real-time.
- RTP streaming.
## Features
* ECMAScript 6/Idiomatic Rust low level API.
* Multi-stream: multiple audio/video streams over a single ICE + DTLS transport.
* IPv6 ready.
* ICE / DTLS / RTP / RTCP over UDP and TCP.
* Simulcast and SVC support.
* Congestion control.
* Sender and receiver bandwidth estimation with spatial/temporal layers distribution algorithm.
* Data message exchange (via WebRTC DataChannels, SCTP over plain UDP, and direct termination in Node.js/Rust).
* Extremely powerful (media worker thread/subprocess coded in C++ on top of [libuv](https://libuv.org)).
- ECMAScript 6/Idiomatic Rust low level API.
- Multi-stream: multiple audio/video streams over a single ICE + DTLS transport.
- IPv6 ready.
- ICE / DTLS / RTP / RTCP over UDP and TCP.
- Simulcast and SVC support.
- Congestion control.
- Sender and receiver bandwidth estimation with spatial/temporal layers distribution algorithm.
- Data message exchange (via WebRTC DataChannels, SCTP over plain UDP, and direct termination in Node.js/Rust).
- Extremely powerful (media worker thread/subprocess coded in C++ on top of [libuv](https://libuv.org)).
## Demo Online
...
...
@@ -69,31 +62,24 @@ mediasoup and its client side libraries provide a super low level API. They are
Try it at [v3demo.mediasoup.org](https://v3demo.mediasoup.org)([source code](https://github.com/versatica/mediasoup-demo)).
## Authors
* Iñaki Baz Castillo [[website](https://inakibaz.me)|[github](https://github.com/ibc/)]
* José Luis Millán [[github](https://github.com/jmillan/)]
* Nazar Mokynskyi [[github](https://github.com/nazar-pc/)]
- Iñaki Baz Castillo [[website](https://inakibaz.me)|[github](https://github.com/ibc/)]
- José Luis Millán [[github](https://github.com/jmillan/)]
- Nazar Mokynskyi [[github](https://github.com/nazar-pc/)]