# Live Phase 2B.1 repair + Phase 2B.2 private room

**Date:** 2026-07-26  
**Workspace:** `/Users/bradcamp/Desktop/The Complete Istockhomes`  
**Rollback:** `_backups/2026-07-26-live-phase2b2/`

## Part 1 — Start Camera root cause

Production showed the Start Camera UI but clicks did nothing. Most likely causes combined:

1. **Stale cached `live.js`** (Phase 1 share/copy only) — no cache-busting query string.
2. **Silent early return** if any control element was missing — no user-visible status.
3. No “JS loaded” status, so a dead script was indistinguishable from a working idle state.

### Repair

- Cache-bust: `/live/assets/live.js?v=20260726d` (via `live_asset_url()`)
- Init status: **Camera ready — click Start Camera**
- Hardened selectors (`id` + `data-live-media`)
- Optional controls no longer abort Start Camera wiring
- Explicit click `preventDefault` + HTTPS / `mediaDevices` checks

## Part 2 — Private two-person room

- Host: Dashboard → **Start Private Video Room**
- Guest: invitation link → display name → room
- WebRTC peer connection + PHP JSON signalling (short poll)
- Private text chat (poll)
- Interim storage: `App/secure/live/rooms/*.json` (web-denied)
- Migration 024 documented **NOT EXECUTED**
- STUN default; TURN via `App/secure/live/ice-config.php` (example only in git)

## Production script URL

`/live/assets/live.js?v=20260726d`  
Room page also loads `/live/assets/live-room.js?v=20260726d`

## TURN

**Not configured in git.** Deploy `App/secure/live/ice-config.php` from the example and set `turn_configured` when credentials exist. Same-network / STUN-only testing only until then.

## Tests

Desktop/iPhone two-device HTTPS tests: **VERIFY after upload** — do not claim production-ready until completed.
