diff --git a/.github/workflows/develop-deb.yml b/.github/workflows/develop-deb.yml index fa7748b7..b9435f05 100644 --- a/.github/workflows/develop-deb.yml +++ b/.github/workflows/develop-deb.yml @@ -1,8 +1,8 @@ -name: Deployer-develop +name: Debian package -on: # workflow_dispatch +on: push: - branches: [ develop ] + branches: [ develop, release-3.5.0 ] # pull_request: # branches: [ develop ] @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -25,20 +25,26 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: | - sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install jq npm build-essential || true + + - name: Get eduMEET version + id: get-version + run: | + echo "::set-output name=VERSION::$(cat edumeet/server/package.json | jq -r '.version')" + + - name: Build Debian package + id: build-deb + run: | cd edumeet cp server/config/config.example.js server/config/config.js + cp server/config/config.example.yaml server/config/config.yaml cp app/public/config/config.example.js app/public/config/config.js - touch server/config/config.yaml cd app - yarn install - yarn build + yarn install && yarn build cd ../server + yarn install && yarn build cat <<< $(jq '.bundleDependencies += .dependencies' package.json) > package.json - yarn install npm pack - VERSION=$(cat package.json | jq -r '.version') + VERSION=${{ steps.get-version.outputs.VERSION }} DATE=$(date) mkdir -p /home/runner/package cd /home/runner/package @@ -52,35 +58,49 @@ jobs: touch DEBIAN/md5sums touch DEBIAN/md5sums touch DEBIAN/control - find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum 1>/dev/null 2>/dev/null || true - echo """Package: edumeet-develop + #find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum 1>/dev/null 2>/dev/null || true + # + cat > DEBIAN/control <= 14), redis - """ > DEBIAN/control - echo """#!/bin/bash + Priority: optional + Description: eduMMET is multiparty web-meetings based on mediasoup and WebRTC + Packet created from ${{ github.ref_name }} branch, commit:${{ github.sha }} + Visit ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} for details + Depends: nodejs (>= 16), redis + EOF + # + cat > DEBIAN/postinst < DEBIAN/postinst + echo "eduMEET multiparty meeting is installed.\n" + echo "\n\nClient and server configuration files are in /etc/edumeet directory\n" + echo "Please visit ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} for configuration details.\n\n" + echo "\n\nAfter configuration, start service with 'sudo systemctl start edumeet' command.\n\n" + EOF + # chmod 775 DEBIAN/postinst cd ../ dpkg-deb -Zgzip --build package - mv /home/runner/package.deb /home/runner/edumeet-develop.deb - - name : Release Package + mv /home/runner/package.deb /home/runner/edumeet-$VERSION-beta1.deb + + - name : Upload artifact uses: actions/upload-artifact@v2 with: - name: edumeet-develop - path: "/home/runner/edumeet-develop.deb" + name: edumeet-${{ steps.get-version.outputs.VERSION }}-beta1 + path: "/home/runner/edumeet-*.deb" + + - name: Add to release assets + uses: softprops/action-gh-release@v1 + with: + tag_name: "v3.5.0-beta.1" + files: "/home/runner/edumeet-*.deb" diff --git a/.gitignore b/.gitignore index d0eb5b54..30d7553a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ node_modules/ /app/public/images/logo.* !/app/public/images/logo.edumeet.svg /server/config/ -!/server/config/config.example.js +!/server/config/config.example.* +!/server/config/README.md /server/public/ /server/certs/ /server/dist/ diff --git a/README.md b/README.md index 0b13c4c7..e32a6384 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# ![edumeet logo](/app/public/images/logo.edumeet.svg) -A WebRTC meeting service using [mediasoup](https://mediasoup.org). - +# ![edumeet logo](/app/public/images/logo.edumeet.svg) **WebRTC meeting service using [mediasoup](https://mediasoup.org).** Official website: [edumeet.org](https://edumeet.org) https://user-images.githubusercontent.com/37835902/152279867-639db9bc-bf78-430f-b96f-d17733527474.mp4 @@ -11,43 +9,45 @@ Try it online at [letsmeet.no](https://letsmeet.no) | Feature | Description | | ------------- | ------------- | -| **A/V streaming** | You can share your microphone and camera + additional video stream | -| **Video layouts** | You can choose between **Democratic** and **Filmstrip** views. More in progress. | -| **Screen sharing** | You can share your screen to make some presentation right from your desktop | -| **File sharing** | You can share your files with the peers (torrent solution under the hood) | -| **Chat messages** | You can make a text conversation with peers | +| **A/V streaming** | Share your microphone and camera + additional video stream | +| **Video layouts** | Choose between **Democratic** and **Filmstrip** views. More in progress. | +| **Screen sharing** | Share your screen to make some presentation right from your desktop | +| **File sharing** | Share your files with the peers (torrent solution under the hood) | +| **Chat messages** | Text conversation with other participants | | **Local Recording** | Record window/tab/screen content in browser supported formats with room audio and save them (**disabled by default**) | -| **Authorization** | Supported types: **OIDC**, **SAML**, **local db (text-based)** | +| **Authentication** | Supported types: **OIDC**, **SAML**, **local db (text-based)** | -**Internationalization (22 languages)** +### Internationalization (22 languages)
Help us with translations:exclamation: - ##### How to contribute? + #### How to contribute? - 1. take a certain [language file](https://github.com/edumeet/edumeet/tree/develop/app/src/intl/translations) you want to translate + 1. Continue to translate existing [language file](/app/src/intl/translations) 2. find the _null_ values > "settings.language": null, 3. replace them based on the _en.json_ file - > "settings.language": "Select language", - 4. make a Pull Request, or send us a [e-mail](mailto:community@lists.edumeet.org) with file - - Thanks so much in advance! + > "settings.language": "Select language", + 4. If your language is not listed, create a new translation _.json_ file.. + > copy en.json to [_"two letter country code"_.json](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) and translate to your languange + 5. make a Pull Request, or send us a file by [e-mail](mailto:community@lists.edumeet.org) + + Thank you in advance!
-**Local Recording** +### Local Recording
See more - * Local Recording records the browser window video and audio. From the list of media formats that your browser supports you can select your preferred media format in the settings menu advanced video menu setting. MediaRecorder makes small chucks of recording and these recorded blob chunks temporary stored in IndexedDB, if IndexedDB implemented in your browser. Otherwise it stores blobs in memory in an array of blobs. +* Local Recording records the browser window video and audio. From the list of media formats that your browser supports you can select your preferred media format in the settings menu advanced video menu setting. MediaRecorder makes small chucks of recording and these recorded blob chunks temporary stored in IndexedDB, if IndexedDB implemented in your browser. Otherwise it stores blobs in memory in an array of blobs. Local Recording creates a local IndexedDB with the name of the starting timestamp (unix timestamp format) And a storage called chunks. All chunks read in an array and created a final blob that you can download. After blobs array concatenation as a big blob, this big blob saved as file, and finally we delete the temporary local IndexedDB. -* Local recording is **disabled** by default. You can enable it by setting localRecordingEnabled to true in (./app/public/config/config.js) +* Local recording is **disabled** by default. It could be enabled by setting _localRecordingEnabled_ to true in (./app/public/config/config.js) -* **WARNINIG**: Take care that You need for local recording extra cpu, memory and disk space. - **You need to have good enough free disk space!!** +* **WARNING**: Take care that local recording will increase cpu, memory and disk space consumption. +**Enough free disk space has to be provided!!!** Keep in mind that Browsers don't allow to use all the disk free capacity! See more info about browsers storage limits: * @@ -55,21 +55,15 @@ See more info about browsers storage limits:
-## Docker +# Installation -Get docker image [here](https://hub.docker.com/r/edumeet/edumeet/) +See here for [Docker](https://github.com/edumeet/edumeet-docker/) or [Ansible](https://github.com/edumeet/edumeet-ansible/) (based on Docker) installation procedures -## Ansible (based on Docker) +## Debian & Ubuntu based operating systems (.deb package) -See [more](https://github.com/edumeet/edumeet-ansible/). - -## .deb package (for debian-based systems) - -If you want to install it on the Debian & Ubuntu based operating systems. - -* Prerequisites: [node v16.x](https://github.com/nodesource/distributions/blob/master/README.md#debinstall) (tested with v16.13.2 version) - -* Get package [here](https://github.com/edumeet/edumeet/actions?query=workflow%3ADeployer+branch%3Amaster+is%3Asuccess) (job artifact) +* Prerequisites: Installed NodeJS (v16.x) as described in [Manual installation](#manual-installation-build) section. +* See [Configuration](#configuration) section for client and server configuration details. +* Download from [releases](https://github.com/edumeet/edumeet/releases) assets, or latest job [artifact](https://github.com/edumeet/edumeet/actions?query=workflow%3ADeployer+branch%3Amaster+is%3Asuccess). ```bash # Unzip the file @@ -78,36 +72,111 @@ unzip edumeet.zip # Install the package sudo apt install edumeet/edumeet.deb -# After package installation, don't forget the configure ip address in config file. -sudo nano /etc/meeting/server-config.js +# After package installation, don't forget to edit configuration files. +sudo nano /etc/educonf/client-config.js +sudo nano /etc/educonf/server-config.js +sudo nano /etc/educonf/server-config.yaml # Finally, start the service by (it's enabled by default) sudo systemctl start edumeet ``` ## Manual installation (build) - -### install -Note: We strongly recommend to always use a _yarn_ package manager. - +Installation example is based on Debian/Ubuntu Linux operating system. +1. Install [NodeJS (v16.x)](https://github.com/nodesource/distributions) and [Yarn ](https://classic.yarnpkg.com/en/docs/install#debian-stable) package manager +- NodeJS (v16.x) [Debian/Ubuntu](https://github.com/nodesource/distributions#deb) +```bash +# Using Ubuntu +curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - +sudo apt-get install -y nodejs + +# Using Debian, as root +curl -fsSL https://deb.nodesource.com/setup_16.x | bash - +apt-get install -y nodejs +``` +- Yarn package manager: +```bash +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +sudo apt update && sudo apt install yarn +``` +2. Install all required dependencies ```bash -# Install all the required dependencies and NodeJS v14 (Debian/Ubuntu) and Yarn package manager: sudo apt update && sudo apt install -y curl git python python3-pip build-essential redis openssl libssl-dev pkg-config -curl -fsSL https://deb.nodesource.com/setup_14.x | sudo bash - -curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null -echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list -sudo apt update && sudo apt install -y yarn nodejs - -# get version +``` +3. Clone eduMEET git repository +```bash git clone https://github.com/edumeet/edumeet.git - cd edumeet - -# switch to the "develop" branch to get the latest version for developing +``` +(switch to the "develop" branch to get the latest features) +```bash git checkout develop ``` +### Configuration +**eduMEET** will start and run normally with just default settings. If there is no configuration files, it will automatically detect your host IP address, and listen on port 443 (https). In order to change default values (e.g. certificates), or activate features (e.g. authentication), use appropriate configuration file (see below for details). + +**:warning: Note:** There are separate configuration files for eduMEET application and eduMEET server: + +**eduMEET application (app)** for: enabling login, change logo or background, adjust A/V parameters, etc... + +Copy [example](/app/public/config/config.example.js) template and edit values (see all available parameters in [./app/public/config/README.md](/app/public/config/README.md)) +```bash +cp app/public/config/config.example.js app/public/config/config.js +``` + +**eduMEET server** require **:warning:two** configuration files: **config.js**, and **config.{_json_, _yaml_ or _toml_}** (multiple format supported) + +**1. config.js** for setting authentication methods and user roles. + +Copy example template and edit values (see additional details in [example](/server/config/config.example.js) file) +```bash +cp server/config/config.example.js server/config/config.js +``` + +**2. config.{_json_, _yaml_ or _toml_}** for configuring: server port, server certificates, [STUN/TURN](#turn-configuration) configuration, monitoring, etc... (See below examples of different configuration styles). + +[**:point_right: _config.yaml_**](/server/config/config.example.yaml) example: +```yaml + listeningPort: 443 + tls: + key: /opt/edumeet/server/certs/privkey.pem + cert: /opt/edumeet/server/certs/cert.pem +``` +[**:point_right: _config.json_**](/server/config/config.example.json) example: +```javascript + { + "listeningPort" : "443", + "tls" : { + "cert" : "/opt/edumeet/server/certs/cert.pem", + "key" : "/opt/edumeet/server/certs/privkey.pem" + } + } +``` +[**:point_right: _config.toml_**](/server/config/config.example.toml) example: +```toml + listeningPort = "443" + + [tls] + cert = "/opt/edumeet/server/certs/cert.pem" + key = "/opt/edumeet/server/certs/privkey.pem" +``` +**:red_circle: IMPORTANT:** Use **only one** type for second configuration file (`yaml` file format is highly recommended) + +Copy **only one** example template file and edit values (see all available parameters in [./server/config/README.md](/server/config/README.md)) +```bash +cp server/config/config.example.yaml server/config/config.yaml + OR!!! +cp server/config/config.example.json server/config/config.json + OR!!! +cp server/config/config.example.toml server/config/config.toml +``` + +**:warning: NOTE:** application and server components **has to be rebuild** if configuration parameter is changed ([see build steps](#manual-installation-build)). Rebuild is not necessary for Docker or Debian (.deb) version, just restart container/service. + +### Build +**Note:** It is highly recommended to use _yarn_ package manager. -### build ```bash cd app yarn && yarn build @@ -115,78 +184,32 @@ yarn && yarn build cd ../server yarn && yarn build ``` +### Run -### configure - -Note: Edumeet will start on the default settings (if you don't create your own configuration files) - -Important! You must always **rebuild** the edumeet when you change something in the configuration files. - -#### use template (example) -Just clone the example files and adjust them if required. - -```bash -cp server/config/config.example.js server/config/config.js -cp app/public/config/config.example.js app/public/config/config.js -``` - -#### To change default options, create your own server config file (yaml or json) - -Example when usingi _config.yaml_ file -```yaml -turnAPIKey: "" -turnAPIURI: "https://api.turn.geant.org/turn" -mediasoup: - webRtcTransport: - listenIps: - - ip: "" - announcedIp: "" -``` -Example when using _config.json_ file -```javascript -{ - [ - { - "urls": [ - "turn:turn.example.com:443?transport=tcp" - ], - "username": "example", - "credential": "example" - } - ] -}; -``` - -Full documentation and list of all settings: -| destination | location | -| --- | --- | -| app side | [./app/README.md](https://github.com/edumeet/edumeet/blob/develop/app/README.md) | -| srv side | [./server/README.md](https://github.com/edumeet/edumeet/blob/develop/server/README.md) | - -### Run - -#### locally (for development) - -* The newest build is always in **develop branch** if you want to make a contribution/pull request use it instead of master branch. - -```bash -# You can run a live build from app folder and running : -app$ yarn start - -# Also you need to start a server in server folder too. -server$ yarn start -``` - -#### locally +**Run on server** (as root or with sudo) ```bash # Run the Node.js server application in a terminal: cd server -yarn start +sudo yarn start ``` -Note: Do not run the server as root. Instead, do redirects on the firewall: +**Run locally** (for development) + +* The newest build is always in **develop branch** if you want to make a contribution/pull request use it instead of master branch. + ```bash +# run a live build from app folder: +app$ yarn start + +# and run server in server folder: +server$ yarn start +``` + +Note: To avoid running server as root, redirects privileged ports with firewall rules: +```bash +#adjust ports to your needs + sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443 sudo iptables -t nat -A OUTPUT -p tcp --dport 443 -o lo -j REDIRECT --to-port 8443 sudo iptables -t nat -A PREROUTING -p tcp --dport 3443 -j REDIRECT --to-ports 8443 @@ -197,10 +220,9 @@ sudo apt install iptables-persistent sudo iptables-save > /etc/iptables/rules.v4 sudo ip6tables-save > /etc/iptables/rules.v6 ``` - * Test your service in a webRTC enabled browser: `https://yourDomainOrIPAdress:3443/roomname` -#### as a service (systemd) +**Run as a service** (systemd) ```bash # Stop your locally running server. Copy systemd-service file `edumeet.service` to `/etc/systemd/system/` and check location path settings: @@ -220,9 +242,9 @@ sudo systemctl enable edumeet ## Ports and firewall | Port | protocol | description | | ---- | ----------- | ----------- | -|443 | tcp | default https webserver and signaling - adjustable in `server/config.js`) | +| 443 | tcp | default https webserver and signaling - adjustable in `server/config/config.yaml`) | | 4443 | tcp | default `yarn start` port for developing with live browser reload, not needed in production environments - adjustable in app/package.json) | -| 40000-49999 | udp, tcp | media ports - adjustable in `server/config.js` | +| 40000-49999 | udp, tcp | media ports - adjustable in `server/config/config.yaml` | ## Load balanced installation @@ -237,7 +259,7 @@ To integrate with an LMS (e.g. Moodle), have a look at [LTI](LTI/LTI.md). If you are part of the GEANT eduGAIN, you can request your turn api key at [https://turn.geant.org/](https://turn.geant.org/) You need an additional [TURN](https://github.com/coturn/coturn)-server for clients located behind restrictive firewalls! -Add your server and credentials to `server/config/config.js` +Add your server and credentials to `server/config/config.yaml` ## Community-driven support | Type | | @@ -266,3 +288,4 @@ MIT License (see `LICENSE.md`) Contributions to this work were made on behalf of the GÉANT project, a project that has received funding from the European Union’s Horizon 2020 research and innovation programme under Grant Agreement No. 731122 (GN4-2). On behalf of GÉANT project, GÉANT Association is the sole owner of the copyright in all material which was developed by a member of the GÉANT project. GÉANT Vereniging (Association) is registered with the Chamber of Commerce in Amsterdam with registration number 40535155 and operates in the UK as a branch of GÉANT Vereniging. Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK. + diff --git a/app/README.md b/app/public/config/README.md similarity index 94% rename from app/README.md rename to app/public/config/README.md index d2ea88b2..2b59e31f 100644 --- a/app/README.md +++ b/app/public/config/README.md @@ -1,21 +1,4 @@ -# Edumeet App Configuration - -The app configuration file should be a valid javascript file defining a single -`config` object containing the properties that you need to modify. - -Example `public/config/config.example.js`: -```javascript -var config = -{ - developmentPort : 3443, - productionPort : 443 -}; -``` -The actual app-config of a running edumeet instance can you get on https://yourinstance:yourport/?config=true -An example configuration file with all properties set to default values -can be found here: [config.example.js](public/config/config.example.js). - -## Configuration properties +# ![edumeet logo](/app/public/images/logo.edumeet.svg) App Configuration properties list: | Name | Description | Format | Default value | | :--- | :---------- | :----- | :------------ | diff --git a/app/src/config.ts b/app/src/config.ts index 6fdbd6a9..c0a0eab4 100644 --- a/app/src/config.ts +++ b/app/src/config.ts @@ -38,7 +38,7 @@ const configSchema = convict({ { doc : 'The production server listening port.', format : 'port', - default : 8443 + default : 443 }, serverHostname : { @@ -668,24 +668,7 @@ function formatJson(data: string) function dumpDocsMarkdown() { - let data = `# Edumeet App Configuration - -The app configuration file should be a valid javascript file defining a single -\`config\` object containing the properties that you need to modify. - -Example \`public/config.js\`: -\`\`\`javascript -var config = -{ - developmentPort : 8443, - productionPort : 3443 -}; -\`\`\` - -An example configuration file with all properties set to default values -can be found here: [config.example.js](public/config/config.example.js). - -## Configuration properties + let data = `# ![edumeet logo](/app/public/images/logo.edumeet.svg) App Configuration properties list: | Name | Description | Format | Default value | | :--- | :---------- | :----- | :------------ | @@ -748,7 +731,7 @@ if (typeof window === 'undefined') { import('fs').then((fs) => { - fs.writeFileSync('README.md', dumpDocsMarkdown()); + fs.writeFileSync('public/config/README.md', dumpDocsMarkdown()); fs.writeFileSync('public/config/config.example.js', dumpExampleConfigJs()); }); } diff --git a/app/src/intl/translations/hr.json b/app/src/intl/translations/hr.json index ec4462dc..35a98953 100644 --- a/app/src/intl/translations/hr.json +++ b/app/src/intl/translations/hr.json @@ -1,52 +1,52 @@ { - "configDocumentation.title": null, - "configError.bodyText": null, - "configError.link": null, - "configError.title": null, - "device.activateAudio": "Omogući zvuk", + "configDocumentation.title": "eduMEET postavke", + "configError.bodyText": "Pronađena greška u eduMEET postavkama", + "configError.link": "Pogledajte dokumentaciju postavki", + "configError.title": "Greška u postavkama", + "device.activateAudio": "Uključi mikrofon", "device.audioUnsupported": "Zvuk nije podržan", - "device.muteAudio": "Utišaj zvuk", - "device.options": null, + "device.muteAudio": "Isključi mikrofon", + "device.options": "Postavke", "device.screenSharingUnsupported": "Dijeljenje ekrana nije podržano", - "device.startScreenSharing": "Pokreni dijeljenje ekrana", - "device.startVideo": "Pokreni sliku", + "device.startScreenSharing": "Podijeli ekran", + "device.startVideo": "Uključi kameru", "device.stopScreenSharing": "Zaustavi dijeljenje ekrana", - "device.stopVideo": "Zaustavi sliku", - "device.unMuteAudio": "Vrati zvuk", - "device.videoUnsupported": "Slika nije podržana", + "device.stopVideo": "Isključi kameru", + "device.unMuteAudio": "Uključi mikrofon", + "device.videoUnsupported": "Kamera nije podržana", "devices.cameraDisconnected": "Kamera nije spojena", "devices.cameraError": "Greška prilikom pristupa kameri", "devices.chooseMedia": "Odabir izvora", "devices.devicesChanged": "Uređaji su se promijenili, podesite ponovno uređaje u postavkama", - "devices.disableBothMicrophoneAndCamera": "Ne dozvoli kameru i mikrofon", - "devices.enableBothMicrophoneAndCamera": "Dozvoli kameru i mikrofon", - "devices.enableOnlyCamera": "Dozvoli samo kameru", - "devices.enableOnlyMicrophone": "Dozvoli samo mikrofon", - "devices.microphoneDisconnected": "Mikrofon nije spojen", + "devices.disableBothMicrophoneAndCamera": "Onemogući kameru i mikrofon", + "devices.enableBothMicrophoneAndCamera": "Omogući kameru i mikrofon", + "devices.enableOnlyCamera": "Omogući samo kameru", + "devices.enableOnlyMicrophone": "Omogući samo mikrofon", + "devices.microphoneDisconnected": "Mikrofon odspojen", "devices.microphoneEnable": "Mikrofon omogućen", "devices.microphoneError": "Greška prilikom pristupa mikrofonu", - "devices.microphoneMute": "Mikrofon utišan", - "devices.microphoneMuteError": "Nije moguće utišati mikrofon", - "devices.microphoneUnMute": "Mikrofon pojačan", - "devices.microphoneUnMuteError": "Nije moguće pojačati mikrofon", - "devices.screenSharingDisconnected": "Prekinuto dijeljenje ekrana", + "devices.microphoneMute": "Mikrofon isključen", + "devices.microphoneMuteError": "Nije moguće isključiti mikrofon", + "devices.microphoneUnMute": "Mikrofon uključen", + "devices.microphoneUnMuteError": "Nije moguće uključiti mikrofon", + "devices.screenSharingDisconnected": "Zaustavljeno dijeljenje ekrana", "devices.screenSharingError": "Greška prilikom pristupa ekranu", "filesharing.download": "Učitaj", "filesharing.error": "Greška prilikom dijeljenja datoteke", - "filesharing.missingSeeds": "Ako ovaj proces traje dugo, možda više nitko ne dijeli datoteku. Pokušajte zamoliti nekoga da ponovo učita željenu datoteku.", + "filesharing.missingSeeds": "Ako ovaj proces traje dugo, možda više nitko ne dijeli datoteku. Zamolite nekoga da ponovo podijeli datoteku.", "filesharing.save": "Spremi", "filesharing.saveFileError": "Nije moguće spremiti datoteku", - "filesharing.startingFileShare": "Pokušaj dijeljenja datoteke", + "filesharing.startingFileShare": "Pokrenuto dijeljenje datoteke", "filesharing.successfulFileShare": "Datoteka uspješno podijeljena", "filesharing.unableToShare": "Nije moguće podijeliti datoteku", "label.addVideo": "Dodaj video", "label.advanced": "Napredno", "label.appearance": "Prikaz", - "label.audioSettings": null, - "label.auth": null, + "label.audioSettings": "Postavke zvuka", + "label.auth": "Prijava", "label.bold": "Podebljano", "label.chat": "Razgovor", - "label.chatInput": "Uđi u razgovor porukama", + "label.chatInput": "Razgovor porukama", "label.chatNewMessages": "Nova poruka", "label.chatNoMessages": "Nema poruka", "label.close": "Zatvori", @@ -54,18 +54,18 @@ "label.fileSharingUnsupported": "Dijeljenje datoteka nije podržano", "label.filmstrip": "Prikaz filmska traka", "label.fullscreen": "Puni ekran", - "label.guest": null, + "label.guest": "Gost", "label.high": "Visoka (HD)", "label.italic": "Nakošeno", - "label.join": "Priključivanje", - "label.leave": "Napusti", - "label.leaveWithSavingChat": "Da + spremi poruke ({chatCount})", + "label.join": "Ulaz", + "label.leave": "Izlaz", + "label.leaveWithSavingChat": "Da + spremanje poruka ({chatCount})", "label.login": "Prijava", "label.logout": "Odjava", "label.low": "Niska", "label.media": "Medij", "label.medium": "Srednja", - "label.moreActions": "Više akcija", + "label.moreActions": "Dodatno", "label.newWindow": "Novi ekran", "label.no": "Ne", "label.openDrawer": "Otvori ladicu", @@ -74,11 +74,11 @@ "label.promoteAllPeers": "Promoviraj sve", "label.recordingInProgress": "Snimanje u tijeku...", "label.roomName": "Naziv sobe", - "label.saveChat": "Spremi poruke", + "label.saveChat": "Spremanje poruka", "label.send": "Slanje", - "label.shareFile": "Dijeli datoteku", - "label.shareGalleryFile": "Dijeli sliku", - "label.showAdvancedInformation": null, + "label.shareFile": "Dijeljenje datoteke", + "label.shareGalleryFile": "Dijeljenje slike", + "label.showAdvancedInformation": "Prikaz naprednih informacija", "label.sortAscending": "Posloži uzlazno", "label.sortDescending": "Posloži silazno", "label.ultra": "Ultra visoka (UHD)", @@ -87,11 +87,11 @@ "label.username": "Korisničko ime", "label.version": "Verzija", "label.veryHigh": "Vrlo visoka (FHD)", - "label.videoSettings": null, + "label.videoSettings": "Postavke slike", "label.yes": "Da", "label.yourName": "Vaše ime", - "me.mutedPTT": "Utišani ste{br}pritisnite i držite SPACE tipku za razgovor", - "me.pushToTalk": null, + "me.mutedPTT": "Mikrofon isključen{br}pritisnite i držite SPACE tipku za razgovor", + "me.pushToTalk": "Pritisni za razgovor", "moderator.clearChat": "Moderator je izbrisao razgovor", "moderator.clearFiles": "Moderator je izbrisao datoteke", "moderator.modifyPeerRoles": "Promjena uloge", @@ -104,7 +104,7 @@ "room.accessCodeOff": "Pristupna šifra sobe je neaktivna", "room.accessCodeOn": "Pristupna šifra sobe je aktivna", "room.browsePeersSpotlight": "Pretražite sudionike u središtu pažnje", - "room.cantJoin": "Prijava u sobu nije moguća", + "room.cantJoin": "Ulaz u sobu nije moguća", "room.cantLock": "Zaključavanje sobe nije moguće", "room.cantUnLock": "Otključavanje sobe nije moguće", "room.changeDisplayNameError": "Dogodila se greška prilikom promjene imena", @@ -115,11 +115,11 @@ "room.consentUnderstand": "Razumijem", "room.cookieConsent": "Ova stranica koristi kolačiće radi poboljšanja korisničkog iskustva", "room.emptyRequireLogin": "Soba je trenutno prazna! Prijavite se za pokretanje sastanka, ili sačekajte organizatora", - "room.extraVideo": "Dodatni video", + "room.extraVideo": "Dodatni video izvor", "room.extraVideoDuplication": "Video izvor se već koristi", "room.help": "Pomoć", "room.hideSelfView": "Sakrij svoj video", - "room.joined": "Prijavljeni ste u sobu", + "room.joined": "Ušli ste u sobu", "room.leaveConfirmationMessage": "Želite li izaći iz sobe?", "room.leavingTheRoom": "Izlazak iz sobe", "room.lobbyAdministration": "Upravljanje predvorjem", @@ -139,7 +139,7 @@ "room.loweredHand": "{displayName} je spustio ruku", "room.me": "Ja", "room.moderatoractions": "Akcije moderatora", - "room.muteAll": "Utišaj sve", + "room.muteAll": "Isključi sve mikrofone", "room.newFile": "Dostupna nova datoteka", "room.newLobbyPeer": "Novi sudionik čeka u predvorju", "room.newPeer": "{displayName} je ušao u sobu", @@ -154,10 +154,10 @@ "room.setDemocraticView": "Prikaz promijenjen u način: demokratski", "room.setFilmStripView": "Prikaz promijenjen u način: filmska traka", "room.shortcutKeys": "Prečaci", - "room.showSelfView": "Prikaži svoj video", + "room.showSelfView": "Prikaži svoju sliku", "room.spotlights": "Sudionici u središtu pažnje", "room.stopAllScreenSharing": "Zaustavi sva dijeljenja ekrana", - "room.stopAllVideo": "Ugasi sve kamere", + "room.stopAllVideo": "Isključi sve kamere", "room.toggleAdvancedMode": "Uključen napredni način", "room.unexpectedErrorDuringLocalRecording": "Dogodila se neočekivana greška tijekom lokalnog snimanja", "room.unlocked": "Soba je sada otključana", @@ -171,85 +171,85 @@ "settings.aspectRatio": "Omjer slike", "settings.audio": "Uređaj za zvuk", "settings.audioOutput": "Uređaj za izlaz zvuka", - "settings.audioPreset": null, + "settings.audioPreset": "Pripremljene postavke", "settings.autoGainControl": "Automatsko upravljanje jačinom zvuka", - "settings.buttonControlBar": "Razdvoji upravljanje medijima", + "settings.buttonControlBar": "Izdvojeno upravljanje", "settings.camera": "Kamera", "settings.cantSelectAudio": "Nije moguće odabrati uređaj za zvuk", "settings.cantSelectAudioOutput": "Nije moguće odabrati izlazni uređaj za zvuk", - "settings.cantSelectCamera": "Nije moguće odabrati video uređaj", - "settings.channelCount": null, + "settings.cantSelectCamera": "Nije moguće odabrati kameru", + "settings.channelCount": "Broj zvučnih kanala", "settings.drawerOverlayed": "Bočni izbornik iznad sadržaja", "settings.echoCancellation": "Poništavanje jeke", - "settings.enableOpusDetails": null, - "settings.frameRate": "Brzina kadrova videa", - "settings.hiddenControls": "Skrivene kontrole medija", + "settings.enableOpusDetails": "Omogući OPUS detalje(potrebno osvježavanje stranice)", + "settings.frameRate": "Brzina osvježavanja", + "settings.hiddenControls": "Upravljanje skriveno", "settings.hideNoVideoParticipants": "Ne prikazuj sudionika bez videa", - "settings.language": "Odabir jezika", - "settings.lastn": "Broj vidljivih videozapisa", + "settings.language": "Jezik", + "settings.lastn": "Broj vidljivih sudionika", "settings.layout": "Način prikaza", "settings.mirrorOwnVideo": "Prikaz vlastitog videa", - "settings.myPhotoButton": "Postavi moju sliku", + "settings.myPhotoButton": "Moja slika", "settings.myPhotoLabel": "Dozv. veličina datoteke: 5MB, jpg, jpeg, png", - "settings.myPhotoSizeError": "Datoteka je prevelika", - "settings.myPhotoTypeError": "Nedozvoljen tip datoteke", - "settings.noiseSuppression": "Poništavanje šuma", + "settings.myPhotoSizeError": "Prevelika datoteka", + "settings.myPhotoTypeError": "Nepodržan tip datoteke", + "settings.noiseSuppression": "Ograničavanje šuma", "settings.noiseThreshold": "Granica šuma", "settings.notificationSounds": "Zvuk obavijesti", - "settings.opusDtx": null, - "settings.opusFec": null, - "settings.opusPtime": null, - "settings.permanentTopBar": "Stalna gornja šipka", - "settings.recordingsPreferredMimeType": "Odaberi željeni format videa", - "settings.resolution": "Video rezolucija", - "settings.sampleRate": null, - "settings.sampleSize": null, - "settings.screenSharingFrameRate": "Brzina kadrova dijeljenog ekrana", - "settings.selectAspectRatio": "Odabir omjera slike", - "settings.selectAudio": "Odaberi uređaj za zvuk", - "settings.selectAudioOutput": "Odaberite izlazni uređaj za zvuk", - "settings.selectCamera": "Odaberi video uređaj", - "settings.selectRoomLayout": "Odaberi način prikaza", + "settings.opusDtx": "Omogući OPUS Discontinuous Transmission (DTX)", + "settings.opusFec": "Omogući OPUS Forward Error Correction (FEC)", + "settings.opusPtime": "Odabir OPUS veličine okvira", + "settings.permanentTopBar": "Vidljiv gornji izbornik", + "settings.recordingsPreferredMimeType": "Format lokalnog zapisa", + "settings.resolution": "Rezolucija", + "settings.sampleRate": "Brzina uzorkovanja", + "settings.sampleSize": "Rezolucija uzorka", + "settings.screenSharingFrameRate": "Brzina osvježavanja dijeljenja ekrana", + "settings.selectAspectRatio": "Omjer slike", + "settings.selectAudio": "Odabir uređaja", + "settings.selectAudioOutput": "Odabir izlaznog uređaja", + "settings.selectCamera": "Odabir kamere", + "settings.selectRoomLayout": "Način prikaza", "settings.settings": "Postavke", - "settings.showAdvancedAudio": "Napredne postavke zvuka", - "settings.showAdvancedVideo": "Napredne postavke videa", - "settings.showNotifications": "Prikaži obavijesti", + "settings.showAdvancedAudio": "Napredne postavke", + "settings.showAdvancedVideo": "Napredne postavke", + "settings.showNotifications": "Prikaz obavijesti", "settings.voiceActivatedUnmute": "Glasovno uključivanje mikrofona", - "settings.webcamFrameRate": null, + "settings.webcamFrameRate": "Brzina osvježavanja kamere", "socket.disconnected": "Niste spojeni", "socket.reconnected": "Ponovno ste spojeni", "socket.reconnecting": "Niste spojeni, pokušavamo vas ponovno spojiti", "socket.requestError": "Greška na poslužitelju", "tooltip.addParticipantToSpotlight": "Dodaj sudionika u središte pažnje", "tooltip.admitFromLobby": "Pusti iz predvorja", - "tooltip.enterFullscreen": "Postavi puni ekran", + "tooltip.enterFullscreen": "Puni ekran", "tooltip.inSpotlight": "U središtu pažnje", "tooltip.isSpeaker": "Aktivni govornik", "tooltip.kickParticipant": "Izbaci sudionika", - "tooltip.leaveFullscreen": "Izađi iz punog ekrana", - "tooltip.lobby": "Prikaži predvorje", + "tooltip.leaveFullscreen": "Normalni prikaz", + "tooltip.lobby": "Prikaz predvorja", "tooltip.lockRoom": "Zaključaj sobu", "tooltip.login": "Prijava", "tooltip.logout": "Odjava", - "tooltip.muteParticipant": "Utišaj sudionika", - "tooltip.muteParticipantAudioModerator": "Utišaj sve sudionike", + "tooltip.muteParticipant": "Isključi zvuk sudionika", + "tooltip.muteParticipantAudioModerator": "Isključi zvuk svih sudionika", "tooltip.muteParticipantVideo": "Ne prikazuj video sudionika", "tooltip.muteParticipantVideoModerator": "Ne prikazuj video svih sudionika", "tooltip.muteScreenSharing": "Ne prikazuj dijeljenje ekrana sudionika", "tooltip.muteScreenSharingModerator": "Ne prikazuj dijeljenje ekrana svih sudionika", - "tooltip.participants": "Prikaži sudionike", + "tooltip.participants": "Sudionici", "tooltip.pauseLocalRecording": "Privremeno zaustavi lokalno snimanje", "tooltip.raisedHand": "Podigni ruku", "tooltip.removeParticipantFromSpotlight": "Makni sudionika iz središta pažnje", "tooltip.resumeLocalRecording": "Nastavi lokalno snimanje", - "tooltip.settings": "Prikaži postavke", + "tooltip.settings": "Postavke", "tooltip.startLocalRecording": "Pokreni lokalno snimanje", "tooltip.stopLocalRecording": "Zaustavi lokalno snimanje", "tooltip.unLockRoom": "Otključaj sobu", - "tooltip.unMuteParticipant": "Dozvoli zvuk sudionika", - "tooltip.unMuteParticipantVideo": "Dozvoli video sudionika", - "tooltip.unMuteScreenSharing": "Dozvoli dijeljenje ekrana", + "tooltip.unMuteParticipant": "Omogući zvuk sudionika", + "tooltip.unMuteParticipantVideo": "Omogući video sudionika", + "tooltip.unMuteScreenSharing": "Omogući dijeljenje ekrana", "unsupportedBrowser.bodyText": "Sustav za sastanke zahtijeva funkcionalnosti koje nisu podržane u ovom web pregledniku. Molimo nadogradite, koristite drugi web preglednik ili provjerite vaše postavke. Podržani web preglednici:", "unsupportedBrowser.titleUnsupportedBrowser": "Web preglednik nije podržan!", "unsupportedBrowser.titlewebrtcUnavailable": "Tražene funkcionalnosti nisu podržane u ovom web pregledniku!" -} \ No newline at end of file +} diff --git a/server/README.md b/server/config/README.md similarity index 89% rename from server/README.md rename to server/config/README.md index 4a46c282..abcd2d3e 100644 --- a/server/README.md +++ b/server/config/README.md @@ -1,28 +1,4 @@ -# Edumeet Server Configuration - -The server configuration file can use one of the following formats: - -- config/config.json -- config/config.json5 -- config/config.yaml -- config/config.yml -- config/config.toml - -Example `config.yaml`: - -```yaml -redisOptions: - host: redis - port: 6379 - -listeningPort: 443 -``` - -Additionally, a `config/config.js` can be used to override specific properties -with runtime generated values and to set additional configuration functions and classes. -Look at the default `config/config.example.js` file for documentation. - -## Configuration properties +# ![edumeet logo](/app/public/images/logo.edumeet.svg) server configuration properties list: | Name | Description | Format | Default value | | :--- | :---------- | :----- | :------------ | @@ -54,15 +30,15 @@ Look at the default `config/config.example.js` file for documentation. | routerScaleSize | Room size before spreading to a new router. | `"nat"` | ``40`` | | requestTimeout | Socket timeout value (ms). | `"nat"` | ``20000`` | | requestRetries | Socket retries when a timeout occurs. | `"nat"` | ``3`` | -| mediasoup.numWorkers | The number of Mediasoup workers to spawn. Defaults to the available CPUs count. | `"nat"` | ``6`` | +| mediasoup.numWorkers | The number of Mediasoup workers to spawn. Defaults to the available CPUs count. | `"nat"` | ``4`` | | mediasoup.worker.logLevel | The Mediasoup log level. | `"string"` | ``"warn"`` | | mediasoup.worker.logTags | The Mediasoup log tags. | `"array"` | ``[ "info", "ice", "dtls", "rtp", "srtp", "rtcp"]`` | | mediasoup.worker.rtcMinPort | The Mediasoup start listening port number. | `"port"` | ``40000`` | | mediasoup.worker.rtcMaxPort | The Mediasoup end listening port number. | `"port"` | ``49999`` | | mediasoup.router.mediaCodecs | The Mediasoup codecs settings. [supportedRtpCapabilities](https://github.com/versatica/mediasoup/blob/v3/src/supportedRtpCapabilities.ts) | `"*"` | ``[ { "kind": "audio", "mimeType": "audio/opus", "clockRate": 48000, "channels": 2 }, { "kind": "video", "mimeType": "video/VP8", "clockRate": 90000, "parameters": { "x-google-start-bitrate": 1000 } }, { "kind": "video", "mimeType": "video/VP9", "clockRate": 90000, "parameters": { "profile-id": 2, "x-google-start-bitrate": 1000 } }, { "kind": "video", "mimeType": "video/h264", "clockRate": 90000, "parameters": { "packetization-mode": 1, "profile-level-id": "4d0032", "level-asymmetry-allowed": 1, "x-google-start-bitrate": 1000 } }, { "kind": "video", "mimeType": "video/h264", "clockRate": 90000, "parameters": { "packetization-mode": 1, "profile-level-id": "42e01f", "level-asymmetry-allowed": 1, "x-google-start-bitrate": 1000 } }]`` | -| mediasoup.webRtcTransport.listenIps | The Mediasoup listen IPs. [TransportListenIp](https://mediasoup.org/documentation/v3/mediasoup/api/#TransportListenIp) | `"array"` | ``[ { "ip": "10.0.0.1", "announcedIp": null }, { "ip": "db19:25c4:5f01:9683:cc5a:bcac:fd6e:b38d", "announcedIp": null }]`` | +| mediasoup.webRtcTransport.listenIps | The Mediasoup listen IPs. [TransportListenIp](https://mediasoup.org/documentation/v3/mediasoup/api/#TransportListenIp) | `"array"` | ``[ { "ip": "0.0.0.0", "announcedIp": null } ]`` | | mediasoup.webRtcTransport.initialAvailableOutgoingBitrate | The Mediasoup initial available outgoing bitrate (in bps). [WebRtcTransportOptions](https://mediasoup.org/documentation/v3/mediasoup/api/#WebRtcTransportOptions) | `"nat"` | ``1000000`` | -| mediasoup.webRtcTransport.maxIncomingBitrate | The Mediasoup maximum incoming bitrate for each transport. (in bps). [setMaxIncomingBitrate](https://mediasoup.org/documentation/v3/mediasoup/api/#transport-setMaxIncomingBitrate) | `"nat"` | ``1500000`` | +| mediasoup.webRtcTransport.maxIncomingBitrate | The Mediasoup maximum incoming bitrate for each transport. (in bps). [setMaxIncomingBitrate](https://mediasoup.org/documentation/v3/mediasoup/api/#transport-setMaxIncomingBitrate) | `"nat"` | ``15000000`` | | prometheus.enabled | Enables the Prometheus metrics exporter. | `"boolean"` | ``false`` | | prometheus.listen | Prometheus metrics exporter listening address. | `"string"` | ``"localhost"`` | | prometheus.port | The Prometheus metrics exporter listening port. | `"port"` | ``8889`` | diff --git a/server/config/config.example.json b/server/config/config.example.json new file mode 100644 index 00000000..780b3a4a --- /dev/null +++ b/server/config/config.example.json @@ -0,0 +1,44 @@ +{ + "listeningPort" : "443", + "listeningHost" : "host.domain.tld", + + "fileTracker" : "wss://tracker.openwebtorrent.com", + + "tls" : { + "cert" : "/opt/edumeet/server/certs/cert.pem", + "key" : "/opt/edumeet/server/certs/privkey.pem" + }, + + "turnAPIKey" : "Your API key", + "turnAPIURI" : "https://host.domain.tld/turn", + + "backupTurnServers" : { + "urls": [ "turn:host.domain.tld:443?transport=tcp" ], + "username" : "Your username", + "credential" : "Your's credential" + }, + + "redisOptions": { + "host" : "127.0.0.1", + "port" : "6379", + "password" : "_REDIS_PASSWORD_" + }, + + "prometheus" : { + "enabled" : "true", + "deidentify" : "true", + "numeric" : "true", + "listen" : "host.domain.tld" + }, + + "mediasoup" : { + "webRtcTransport" : { + "listenIps" : [ + { + "ip": "PUBLIC_IP_ADDRESS", + "announcedIp" : "" + } + ] + } + } +} diff --git a/server/config/config.example.toml b/server/config/config.example.toml new file mode 100644 index 00000000..2de7503b --- /dev/null +++ b/server/config/config.example.toml @@ -0,0 +1,30 @@ +listeningPort = "443" +listeningHost = "host.domain.tld" +fileTracker = "wss://tracker.openwebtorrent.com" +turnAPIKey = "Your API key" +turnAPIURI = "https://host.domain.tld/turn" + +[tls] +cert = "/opt/edumeet/server/certs/cert.pem" +key = "/opt/edumeet/server/certs/privkey.pem" + +[backupTurnServers] +urls = [ "turn:host.domain.tld:443?transport=tcp" ] +username = "Your username" +credential = "Your's credential" + +[redisOptions] +host = "127.0.0.1" +port = "6379" +password = "_REDIS_PASSWORD_" + +[prometheus] +enabled = "true" +deidentify = "true" +numeric = "true" +listen = "host.domain.tld" + +[[mediasoup.webRtcTransport.listenIps]] +ip = "PUBLIC_IP_ADDRESS" +announcedIp = "" + diff --git a/server/config/config.example.yaml b/server/config/config.example.yaml new file mode 100644 index 00000000..c5fd075a --- /dev/null +++ b/server/config/config.example.yaml @@ -0,0 +1,35 @@ +listeningPort: 443 +listeningHost: host.domain.tld + +fileTracker" : "wss://tracker.openwebtorrent.com" + +tls: + key: /opt/edumeet/server/certs/privkey.pem + cert: /opt/edumeet/server/certs/cert.pem + +turnAPIURI: "https://host.domain.tld/turn" +turnAPIKey: "Your API key" + +backupTurnServers: +- urls: + - "turn:host.domain.tld:443?transport=tcp" + username: "Your username" + credential: "Your's credential" + +redisOptions: + host: "127.0.0.1" + port: "6379" + password: "_REDIS_PASSWORD_" + +prometheus: + enabled: true + deidentify: true + numeric: true + listen: host.domain.tld + +mediasoup: + webRtcTransport: + listenIps: + - ip: "PUBLIC_IP_ADDRESS" + announcedIp: "" + diff --git a/server/lib/config/config.ts b/server/lib/config/config.ts index 80fcd6e1..ba224005 100644 --- a/server/lib/config/config.ts +++ b/server/lib/config/config.ts @@ -200,7 +200,7 @@ const configSchema = convict({ listeningPort : { doc : 'The HTTPS listening port.', format : 'port', - default : 8443 + default : 443 }, listeningRedirectPort : { doc : 'The HTTP server listening port used for redirecting any HTTP request to HTTPS. If 0, the redirect server is disabled.', diff --git a/server/utils/gen-config-docs.ts b/server/utils/gen-config-docs.ts index ba0c3fd8..2d925d10 100644 --- a/server/utils/gen-config-docs.ts +++ b/server/utils/gen-config-docs.ts @@ -6,31 +6,7 @@ function formatJson(data) return `\`${data.replace(/\n/g, '')}\``; } -let data = `# Edumeet Server Configuration - -The server configuration file can use one of the following formats: - -- config/config.json -- config/config.json5 -- config/config.yaml -- config/config.yml -- config/config.toml - -Example \`config.yaml\`: - -\`\`\`yaml -redisOptions: - host: redis - port: 6379 - -listeningPort: 3443 -\`\`\` - -Additionally, a \`config/config.js\` can be used to override specific properties -with runtime generated values and to set additional configuration functions and classes. -Look at the default \`config/config.example.js\` file for documentation. - -## Configuration properties +let data = `# ![edumeet logo](/app/public/images/logo.edumeet.svg) server configuration properties list: | Name | Description | Format | Default value | | :--- | :---------- | :----- | :------------ | @@ -40,6 +16,17 @@ Object.entries(configDocs).forEach((entry: [string, any]) => { const [ name, value ] = entry; + // escape dynamically created default values + switch (name) + { + case 'mediasoup.webRtcTransport.listenIps': + value.default = '[ { "ip": "0.0.0.0", "announcedIp": null } ]'; + break; + case 'mediasoup.numWorkers': + value.default = '4'; + break; + } + data += `| ${name} | ${value.doc} | ${formatJson(value.format)} | \`${formatJson(value.default)}\` |\n`; }); @@ -50,7 +37,7 @@ data += ` *Document generated with:* \`yarn gen-config-docs\` `; -writeFile('README.md', data).then(() => +writeFile('config/README.md', data).then(() => { console.log('done'); // eslint-disable-line }, (err) =>