fix(calls): screen-share stage never applied + could stick on peers (LC-408) #423
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lc-408-screenshare-stage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes two bugs in the LC-408 screen-share pin reported after #421.
1. The stage layout never applied (sharing tile didn't span; no filmstrip)
voice.jsshowed the participant grid with an inlinestyle.display = 'grid'. An inline style beats the stylesheet, so the.lc-voice-grid:has(.lc-voice-tile[data-screen])rule that switches the container to a flex "stage" was silently overridden - the grid stayed an even grid and nothing pinned.Fix: toggle a
.lc-voice-grid--hiddenclass for the shown/hidden state instead of an inlinedisplay. With no inline override, the stage rule wins by specificity, so the sharing tile spans full width (letterboxed) and the others drop to a filmstrip below.2. A peer could stay "sharing" after the presenter stopped
The explicit
voice_screen=falsedoes cleardata-screen, but when the presenter has no camera the peer's<video>could freeze on the last screen frame (a missed trackonmute/onremovetrack), so it still looked like sharing.Belt-and-suspenders, both client-side:
screenevent now re-runsupdateTileMediato revert the camera-vs-avatar swap when the signal arrives, andupdateTileMediaclears a staledata-screenon any remote tile that no longer has a live video track (a screen share always carries one), so the stage can never get stuck pinned even if the explicit signal is missed.Scope
Frontend only:
assets/voice.js(class toggle + two robustness nudges),templates/voice/page.html(grid hidden via class, not inline display),assets/main.css(the--hiddenrule). No Rust, route, or schema change.Tests
just check,just test,just test-saasall pass.voice.jssyntax-checked;just build-cssregenerated.