From 89fee6ca4a843cdf309b71cd024164f4323904d9 Mon Sep 17 00:00:00 2001 From: gramps Date: Tue, 1 Sep 2026 22:25:20 -0700 Subject: [PATCH] fix: webcam identity->device key for output frames; top bar always has a Start; light-pill grouping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Take two (2026-09-01) three confirmed defects, all from creator feedback + the new resolver logging: 1. NO WEBCAM IN OUTPUT: WebcamSceneConfig.WebcamId carries the identity GUID; CameraManager keys sessions by DEVICE id — GetLatestFrame(guid) returned null forever, the compositor silently dropped the layer while the preview (bitmap path) looked fine. The resolver logging added in 8dcaee0 caught it red-handed. DeviceKeyForWebcam maps identity->device through the _webcam singleton (identity mismatch / unknown ids pass through). Test: WebcamOutputKeyTests. 2. START BUTTON VANISHED AFTER STOP: my pills-clear ruling met the old ShowPrimaryStartButton gate (needed IsConnected or a lit REC pill) — signed-out, pills-off = blank top bar, no session reachable. Start is now ALWAYS the idle face; unarmed Start records (local needs no account — no dead-end no-op); the Sign In button folds into Start's context menu ('Sign in to YouTube', shown while disconnected) with a dedicated SignInCommand. SessionTeardownTests extended: stopped session must leave a reachable Start. 3. TOP BAR ORDER (creator spec): [sign light] REC [pill] [sign light] ON-AIR [pill] — each reality lamp now sits in front of its own intent switch (was: two pills, then two orphaned dots). Sign labels keep the shared StatusSignText style. Tests: WebcamOutputKey, SessionTeardown, FramePump, WebcamMenuGate, GlobalHotkey, BroadcastPullOut — 14/14 across the six classes, clean build 0 warnings. --- Controls/TopBar.xaml | 38 ++++---- .../MainViewModel.Streaming.Operations.cs | 10 +- ViewModels/MainViewModel.Streaming.cs | 16 ++- ViewModels/MainViewModel.cs | 16 ++- ytLive.Tests/SessionTeardownTests.cs | 3 + ytLive.Tests/WebcamOutputKeyTests.cs | 97 +++++++++++++++++++ 6 files changed, 148 insertions(+), 32 deletions(-) create mode 100644 ytLive.Tests/WebcamOutputKeyTests.cs diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml index d53a6f2..54bff2b 100644 --- a/Controls/TopBar.xaml +++ b/Controls/TopBar.xaml @@ -24,29 +24,26 @@ - + - - + + + - - + + + - - - - - - @@ -89,17 +86,16 @@ Visibility="Collapsed"/> - -