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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user