feat: Voice UI overhaul — fix black tiles, focus mode, track lifecycle

- Fix black screen when streams end by checking track readyState === 'live'
- Add track 'ended' event listeners in VoiceUser for immediate fallback to avatar
- Add visible "Grid" button to exit focus mode (replaces undiscoverable double-click)
- Auto-focus screen sharers, auto-unfocus when they stop sharing
- Add LIVE badge, speaking glow shadow, screen share object-contain
- Add TrackMuted/TrackUnmuted/ActiveSpeakersChanged Room events
- Fix PiP video attachment with shouldShow dependency
This commit is contained in:
Jannis Braun
2026-02-19 05:45:31 +01:00
parent 2e309bf959
commit cd48261f54
8 changed files with 218 additions and 88 deletions
@@ -118,6 +118,7 @@ export function PictureInPicture() {
}, [currentVoiceChannelId, channels]);
// Video track attachment
// shouldShow in deps ensures re-run when PiP becomes visible (videoRef was null before)
useEffect(() => {
const videoEl = videoRef.current;
if (!videoEl) return;
@@ -126,7 +127,7 @@ export function PictureInPicture() {
} else {
videoEl.srcObject = null;
}
}, [selectedStream?.track]);
}, [selectedStream?.track, shouldShow]);
// Initialize position to bottom-right
useEffect(() => {