You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: live stats/uptime card in Settings + LIVE pill (#18) (#30)
The broadcast computed BroadcastNetworkHealth (queue, zero-output, target
bitrate) and the ABR's effective fps/bitrate internally but never surfaced
them — the controller exposed only isLive/errorMessage/thermalNotice.
Plumb the telemetry through the @observable controller and display it:
- StreamCore: new pure LiveStats value type (bitRate, frameRate,
queueBytes, zeroOutputSeconds) with an uplink-health classification
(Good/Fair/Congested) and compact bitrate/queue/uptime formatting.
Unit-tested (health boundaries + formatting).
- Publishers: statsSnapshot() on the Publisher protocol, implemented by
RTMPPublisher + SessionPublisher from the ABR's healthSnapshot() + a new
currentFrameRate() (effective fps folding in the congestion + thermal
caps). Returns nil unless actively publishing, so the HUD clears to "—"
during connect/reconnect instead of freezing on stale telemetry.
- ScreenCaptureController: @observable liveStats + broadcastStartedAt, fed
by a ~1s poll that starts on go-live and tears down on every path (all
funnel through stopCapture). Writes snapshots through — including the
reconnect nil — with an equality guard and a post-await cancel check.
- Settings: a live stats/uptime card atop the launcher while broadcasting
(fixed per-tick height so the content-sized drawer never springs),
showing uptime, bitrate (target), effective fps, uplink health, and the
thermal notice; per-metric VoiceOver labels.
- ContentView: a persistent, non-interactive LIVE pill + elapsed timer
overlay while live.
fps/bitrate are the encoder's applied ABR targets, not measured throughput
— measured fps/dropped-frame telemetry depends on M8 (not yet built).
Built via an understand/design + adversarial-review multi-agent workflow;
the review caught and this fixes a reconnect-staleness bug where the HUD
would freeze on last-good values while the stream was actually down.
StreamCore: 69 tests pass. Full app builds against the iOS 27 SDK.
fixes#18
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments