From 8ae9109e2bc3639401680e04983ec8989a6f8c90 Mon Sep 17 00:00:00 2001 From: Jakub Pisarek <99591440+sgfn@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:23:12 +0100 Subject: [PATCH] [RTC-456] Peerless purge, sidebar reorder, config list spacing (#82) --- docs/getting_started/components/hls.md | 4 ++++ docs/getting_started/components/rtsp.md | 3 +++ docs/getting_started/installation.md | 17 +++++++++++++++++ docs/getting_started/peers/webrtc.md | 4 ++++ docs/getting_started/room.md | 21 +++++++++++++++++++++ sidebars.js | 13 +++++++------ 6 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 docs/getting_started/room.md diff --git a/docs/getting_started/components/hls.md b/docs/getting_started/components/hls.md index ef0a289c..7805dcc4 100644 --- a/docs/getting_started/components/hls.md +++ b/docs/getting_started/components/hls.md @@ -23,16 +23,20 @@ See [API](../../for_developers/api_reference/rest_api#tag/room/operation/create_ **Optional** * `lowLatency` (boolean, default: false) - whether the component should use LL-HLS + * `persistent` (boolean, default: false) - whether the stream should be saved or not. After a meeting that integrates an HLS component (with the persistent option set to true) ends, the meeting is preserved as a recording. To manage this recording, use the [Recording API](../../for_developers/api_reference/rest_api#tag/recording). The recording is also available as [HLS Video On Demand (VOD) API](../../for_developers/api_reference/rest_api#tag/recording/operation/getRecordingContent). + * `targetWindowDuration` (positive integer, default: null) - represents the duration, in seconds, of the live streaming content to be maintained in a rolling window. If set to null (default), the entire stream will be available. + * `s3` (object, default: null) - AWS S3 credentials. If credentials are set, the stream will be saved to the specified bucket. This solution will automatically send your streams to an AWS bucket right after the end of your meeting. The uploaded stream will be accessible in the `/` folder within the S3 bucket. For the exact credential structure see [Configuration API](../../for_developers/api_reference/rest_api#tag/room/operation/add_component). + * `subscribeMode` (string "manual" or "auto", default: "auto") - whether HLS component should automatically start consuming available tracks. When set to `manual`, HLS component has to be explicitly told to subscribe to a specific peer/component tracks using the [Subscription API](../../for_developers/api_reference/rest_api#tag/hls/operation/subscribe_hls_to). diff --git a/docs/getting_started/components/rtsp.md b/docs/getting_started/components/rtsp.md index e4c35a59..40bdb31d 100644 --- a/docs/getting_started/components/rtsp.md +++ b/docs/getting_started/components/rtsp.md @@ -28,9 +28,12 @@ Read more about RTSP [here](https://www.rfc-editor.org/rfc/rfc2326.html). **Optional** * `rtpPort` (integer 1..65535, default: 20000) - Local port RTP stream will be received at + * `reconnectDelay` (integer 0.., default: 15000) - Delay (in ms) between successive reconnect attempts + * `keepAliveInterval` (integer 0.., default: 15000) - Interval (in ms) in which keep-alive RTSP messages will be sent to the remote stream source + * `pierceNat` (boolean, default: true) - Whether to attempt to create client-side NAT binding by sending an empty datagram from client to source, after the completion of RTSP setup diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index c873671f..db526329 100644 --- a/docs/getting_started/installation.md +++ b/docs/getting_started/installation.md @@ -127,6 +127,7 @@ set any of them. * `JF_SERVER_API_TOKEN` - token for authorizing HTTP requests.
Defaults to `development` for development builds. + * `JF_HOST` - defines how Jellyfish should be seen from the outside.
Defaults to `JF_IP:JF_PORT`.
It can be in the form of `ip:port`, `domain:port` or simply `domain`. @@ -142,29 +143,38 @@ For running Docker locally, it can simply be `localhost:8080`. * `JF_IP` - an ip address to run the HTTP server on.
Defaults to `127.0.0.1` when running from source or using `mix release`, or `0.0.0.0` for Docker. + * `JF_PORT` - port to run the HTTP server on.
Defaults to `5002` for development builds and `8080` for production builds (`mix release` or Docker). + * `JF_SSL_KEY_PATH` - an absolute path to the SSL key. When both `JF_SSL_KEY_PATH` and `JF_SSL_CERT_PATH` are set, Jellyfish will run HTTPS server instead of HTTP one. An address where this server listens to is still configured via `JF_IP` and `JF_PORT`. + * `JF_SSL_CERT_PATH` - an absolute path the the SSL certificate. When both `JF_SSL_KEY_PATH` and `JF_SSL_CERT_PATH` are set, Jellyfish will run HTTPS server instead of HTTP one. An address where this server listens to is still configured via `JF_IP` and `JF_PORT`. + * `JF_SECRET_KEY_BASE` - used to sign/encrypt tokens generated for Peers. Generated if not provided. + * `JF_CHECK_ORIGIN` - defines if Jellyfish will check the origin of incoming requests and socket connection.
Defaults to `true`.
Possible values are `true`, `false` or a space-separated list of allowed origins (wildcards are allowed).
Example: `JF_CHECK_ORIGIN="https://example.com //another.com:888 //*.other.com"` + * `JF_RESOURCES_BASE_PATH` - a base path where Jellyfish multimedia files are stored
Defaults to `./jellyfish_resources/`.
When running via docker, the directory can be mounted as `-v $(pwd)/host_directory:/app/jellyfish_resources`. + * `JF_METRICS_IP` - an IP address to run metrics endpoint on.
Defaults to `127.0.0.1` when running from source or using `mix release`, or `0.0.0.0` for Docker. + * `JF_METRICS_PORT` - a port to run metrics endpoint on.
Defaults to `9568`. + * `MIX_ENV` - defines compilation environment. This variable takes effect only when running from the source. Docker images are always built with `MIX_ENV=prod`. @@ -178,9 +188,11 @@ Possible values are: * `JF_DIST_ENABLED` - whether to run Jellyfish in a cluster.
Defaults to `false`. + * `JF_DIST_STRATEGY_NAME` - specify which clustering strategy to use.
Possible values are `DNS` or `NODES_LIST`. Defaults to `NODES_LIST`. + * `JF_DIST_NODE_NAME` - Node name used in a cluster. Defaults to `jellyfish@(hostname)`.
It consists of two parts - nodename@hostname. @@ -195,21 +207,25 @@ If `hostname` is not an IP address, it will be automatically resolved as DNS str node names to use IP addresses. This also means that `DNS` strategy has to be run with `JF_DIST_MODE` set to `name`. See our [docker-compose-epmd.yaml](https://github.com/jellyfish-dev/jellyfish/blob/main/docker-compose-epmd.yaml) or [docker-compose-dns.yaml](https://github.com/jellyfish-dev/jellyfish/blob/main/docker-compose-dns.yaml), which we use in our integration tests or refer to [Cluster](../cluster.md) section for examples. + * `JF_DIST_MODE` - distribution mode - can be `name` or `sname`.
Defaults to `sname`.
When using `name`, your hostname has to be an IP address or FQDN of a machine Jellyfish runs on. When using `sname`, your hostname can be any string. See `JF_DIST_NODE_NAME` for more information. + * `JF_DIST_COOKIE` - used to group Jellyfishes in a cluster.
Defaults to `jellyfish_cookie`.
Use different cookies to create multiple clusters on the same machine.
**Important**: cookie does not provide any cryptographic security. Its only purpose is to prevent a node from connecting to a cluster with which it is not intended to communicate. + * `JF_DIST_MIN_PORT`- minimal port used by Jellyfish when forming a cluster (connecting to other Jellyfishes).
Defaults to `9000` when running with Docker.
Only available when running with Docker or `mix release`. + * `JF_DIST_MAX_PORT`- maximal port used by Jellyfish when forming a cluster (connecting to other Jellyfishes).
Defaults to `9000` when running with Docker.
@@ -228,6 +244,7 @@ this one was connected to. ###### Distribution DNS specific: * `JF_DIST_QUERY` - query sent to DNS to discover other Jellyfishes.
Returned list of IPs from DNS is used for creating distribution node name in the format `@`. + * `JF_DIST_POLLING_INTERVAL` - DNS polling interval in ms.
Default value is 5000. diff --git a/docs/getting_started/peers/webrtc.md b/docs/getting_started/peers/webrtc.md index 1d7a6fc4..40595e74 100644 --- a/docs/getting_started/peers/webrtc.md +++ b/docs/getting_started/peers/webrtc.md @@ -19,15 +19,19 @@ Read more about WebRTC [here](https://webrtc.org/). ## Env variables * `JF_WEBRTC_USED` - has to be `true` if WebRTC peers will be used + * `JF_WEBRTC_TURN_LISTEN_IP` - the IP address on which TURN servers will listen. By default set to `127.0.0.1`. When running Jellyfish via Docker, this MUST be set to `0.0.0.0`, even for local tests. + * `JF_WEBRTC_TURN_IP` - the IP address, under which TURN will present itself to the clients. By default set to `127.0.0.1`. When running Jellyfish via Docker, this MUST be set to real (non-loopback) address, even for local tests. + * `JF_WEBRTC_TURN_PORT_RANGE` - port range, where UDP TURN will try to open ports. By default set to `50000-59999`. The bigger the range is, the more users server will be able to handle. Useful when not using the `--network=host` option to limit the UDP ports used only to ones published from a Docker container. + * `JF_WEBRTC_TURN_TCP_PORT` - port number of TCP TURN ## Example Docker commands diff --git a/docs/getting_started/room.md b/docs/getting_started/room.md new file mode 100644 index 00000000..6bf37987 --- /dev/null +++ b/docs/getting_started/room.md @@ -0,0 +1,21 @@ +# Room + +The holder for peers and components. + +## Configuration options + +**Optional** + +* `roomId` (string, default: null) - Custom ID used for identifying the room within Jellyfish. + Must be unique across all rooms. If not provided, a random UUID will be generated. + +* `maxPeers` (integer 1.., default: null) - Maximum number of peers allowed in the room. + If set to null (default), the number of peers is unlimited. + +* `videoCodec` (string "h264" or "vp8", default: null) - Video codec enforced for each peer and component in the room. + If set to null (default), no codec is enforced (peers and components may publish both H264 and VP8). + +* `webhookUrl` (string, default: null) - If provided, Jellyfish notifications will be sent to this URL. + +* `peerlessPurgeTimeout` (integer 1.., default: null) - Duration (in seconds) after which the room + will be removed if no peers are connected. If set to null (default), this feature is disabled. diff --git a/sidebars.js b/sidebars.js index 7adb9073..83fb67ee 100644 --- a/sidebars.js +++ b/sidebars.js @@ -35,12 +35,7 @@ const sidebars = { "getting_started/notifications", "getting_started/metrics", "getting_started/sdks", - { - type: "category", - label: "Peers", - collapsed: true, - items: ["getting_started/peers/webrtc"], - }, + "getting_started/room", { type: "category", label: "Components", @@ -51,6 +46,12 @@ const sidebars = { "getting_started/components/file" ], }, + { + type: "category", + label: "Peers", + collapsed: true, + items: ["getting_started/peers/webrtc"], + }, ], }, {