SFU M0: browser lab E2E client for Janus VideoRoom.

Add lab page with screen-share publisher and subscriber viewer, join API
feed support, shared session auth, static assets route, and lab docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-07 22:15:42 +02:00
parent 61248e6c8b
commit 0c5c079179
7 changed files with 374 additions and 14 deletions

View File

@@ -1,21 +1,29 @@
# SFU relay (Janus-class) — hidden preview
# SFU relay (Janus VideoRoom) — lab preview
**Not in alpha.** Implementation branch: `feature/sfu-relay`. User-visible UI remains off until owner spec is merged.
**Post-alpha product path.** Lab stack: Janus on **cast02**, signaling on app nodes, coturn on cast02.
## Layout
| Path | Role |
|------|------|
| `examples/sfu/README.md` | This file |
| `backend/public/api/sfu_health.php` | Health stub (`enabled: false`) |
| `config.example.php``sfu` | BE feature gate |
| `app/.../sfu/SfuRelayGate.java` | Compile-time preview gate |
| `public/dashboard.php` | Room list / create (auth required) |
| `public/lab.php` | **M0** browser E2E — screen-share publish + subscriber viewer |
| `public/assets/sfu-lab.js` | WebRTC + Janus WS trickle client |
| `public/api/rooms.php` | Room CRUD |
| `public/api/join.php` | JSEP join relay (publisher / subscriber) |
| `ac-deploy/.../smoke_sfu.sh` | Janus + health smoke |
## Next steps (when spec lands)
## Lab E2E
1. Signaling API + room lifecycle tied to cast session IDs / RBAC.
2. Janus or mediasoup on dedicated port (see INFRA — **not** androidcast `:80` vhost).
3. Android: enable `TRANSPORT_WEBRTC` behind `SfuRelayGate` + dev setting only.
4. FE nginx: UDP/TCP ports + TLS for WebRTC (separate from hub/crashes).
1. Sign in on issues console (shared `ac_crash_sess`).
2. Open `/app/androidcast_project/sfu/dashboard` → create room → note **Janus room id**.
3. Open `/app/androidcast_project/sfu/lab` → publish screen share.
4. Second tab/browser → same lab URL → enter room id + **publisher feed id** → Subscribe.
See [20260608_BE_SERVICES_and_infra.md](../../docs/20260608_BE_SERVICES_and_infra.md) § Planned SFU.
## Next (M1+)
1. Android libwebrtc publish/subscribe behind `SfuRelayGate`.
2. Education screen share on SFU path (replace P2P demo).
3. Session RBAC + stats → graphs.
See [ac-docs BUILD_DEPLOY](../../ac-docs/BUILD_DEPLOY.md) and cluster `deploy-janus-sfu.sh`.