From 59c407f1c71e45cd153ce4611c3e3cfca48e7bd8 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Fri, 5 Jun 2026 19:41:22 -0400 Subject: [PATCH] zebra-spaces: idempotent attach + drop stale stream cache --- zebra-report/zebra-spaces.html | 42 +++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/zebra-report/zebra-spaces.html b/zebra-report/zebra-spaces.html index 8c48c75..3eb798b 100644 --- a/zebra-report/zebra-spaces.html +++ b/zebra-report/zebra-spaces.html @@ -3180,6 +3180,20 @@ function applyLipSyncForPub(pubHex){ * applied only when role==='listener' — speakers don't need lock- * screen transport controls. */ function attachAudioStreamViaWorklet(uuid, stream, targetSeconds){ + /* Reject streams that have no live audio tracks. flushSfuStreams hands + * us whatever sfuStreamsByPubHex cached for the publisher's pubkey — + * after a publisher leaves and rejoins with the SAME pubkey, the old + * cached stream's tracks are ended even though the cache entry still + * exists. Without this guard, attach creates a silent MediaStreamSource + * → fallback to