docs(config): add media mode and TURN/recording env guidance

This commit is contained in:
2026-02-08 10:00:00 +00:00
parent aae91ac862
commit 20373f411f
2 changed files with 13 additions and 0 deletions

View File

@@ -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

View File

@@ -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: