From 20373f411fa5d45e048b2c8d8ced8ee8343430dc Mon Sep 17 00:00:00 2001 From: Matiss Jurevics Date: Sun, 8 Feb 2026 10:00:00 +0000 Subject: [PATCH] docs(config): add media mode and TURN/recording env guidance --- Backend/.env.example | 8 ++++++++ Backend/README.md | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/Backend/.env.example b/Backend/.env.example index 22b3ec1..e12b2cf 100644 --- a/Backend/.env.example +++ b/Backend/.env.example @@ -11,5 +11,13 @@ MINIO_SECRET_KEY=minioadmin MINIO_BUCKET=videos MINIO_REGION=us-east-1 MINIO_PRESIGNED_EXPIRY_SECONDS=600 +MEDIA_MODE=legacy +MEDIA_PROVIDER=mock +TURN_URLS= +TURN_USERNAME= +TURN_CREDENTIAL= +MEDIA_RECORDINGS_DIR=media-recordings +MEDIA_MAX_PUBLISHERS=4 +MEDIA_MAX_SUBSCRIBERS_PER_ROOM=12 ADMIN_USERNAME=admin ADMIN_PASSWORD=strong-password diff --git a/Backend/README.md b/Backend/README.md index 5a9300e..fbcf1e7 100644 --- a/Backend/README.md +++ b/Backend/README.md @@ -34,7 +34,11 @@ Required env vars: | `BETTER_AUTH_BASE_URL` | Public base URL for the backend (e.g., `http://localhost:3000`) | | `BETTER_AUTH_TRUSTED_ORIGINS` | Comma-separated list of allowed frontend origins | | `PORT` | HTTP port (default `3000`) | +| `MEDIA_MODE` | Media runtime mode (`legacy` default, `single_server_sfu` scaffold mode) | | `MEDIA_PROVIDER` | Media backend provider (`mock` by default) | +| `TURN_URLS` / `TURN_USERNAME` / `TURN_CREDENTIAL` | TURN/STUN configuration used by single-server SFU mode | +| `MEDIA_RECORDINGS_DIR` | Local output directory for server-side recording workers (planned in SFU mode) | +| `MEDIA_MAX_PUBLISHERS` / `MEDIA_MAX_SUBSCRIBERS_PER_ROOM` | Soft concurrency limits for single-server media mode (planned) | | `MINIO_*` | Connection settings for the MinIO/S3 endpoint | | `ADMIN_USERNAME` / `ADMIN_PASSWORD` | Basic auth for `/admin` dashboard | @@ -148,6 +152,7 @@ Stream realtime events: - Running live transport + fan-out + recording on the same web server is possible for small loads but introduces significant CPU, RAM, and network egress pressure under concurrency. - For larger deployments, use a dedicated media plane (managed or self-hosted SFU + recorder) and keep this service focused on auth/session/control APIs. - For a pragmatic prototype path that keeps media on the current server, see `docs/streaming-on-web-server-plan.md`. +- `MEDIA_MODE=single_server_sfu` currently enables scaffolding only (interfaces/config/health visibility), not full SFU media routing yet. ### API Docs OpenAPI docs are generated from Zod/OpenAPI definitions: