Calls: sharer's own 'Stop Screenshare' button stays lit ~30 s after the server revokes the share #223

Closed
opened 2026-09-18 22:39:45 -04:00 by jared · 1 comment
Owner

Seen while verifying the call-permission live kill (#174 D2-9) on the local LiveKit stack. When an admin turns Allow Screen Sharing off, the voice-limit-guard revokes the publish permission and the SFU drops the sharer's track within 2 s (measured via ListParticipants) — everyone else stops seeing it immediately. But the sharer's own call bar keeps showing Stop Screenshare for ~30 s before flipping back, so for half a minute they believe they are still sharing.

Likely CallControl's screenshare flag only follows EC's media-state echo / the 30 s fallback; the fork's io.lotus.call_state does not carry a screenshare flag today. Fix: have the EC fork emit the local participant's screen-share state (it sees LocalTrackUnpublished / ParticipantPermissionsChanged from LiveKit) in io.lotus.call_state, and let CallControl reconcile screenshare from it — plus a toast "Screen sharing was turned off by a room admin" so the user knows why.

Seen while verifying the call-permission live kill (#174 D2-9) on the local LiveKit stack. When an admin turns Allow Screen Sharing off, the voice-limit-guard revokes the publish permission and the SFU drops the sharer's track **within 2 s** (measured via ListParticipants) — everyone else stops seeing it immediately. But the sharer's own call bar keeps showing *Stop Screenshare* for **~30 s** before flipping back, so for half a minute they believe they are still sharing. Likely `CallControl`'s screenshare flag only follows EC's media-state echo / the 30 s fallback; the fork's `io.lotus.call_state` does not carry a screenshare flag today. Fix: have the EC fork emit the local participant's screen-share state (it sees `LocalTrackUnpublished` / `ParticipantPermissionsChanged` from LiveKit) in `io.lotus.call_state`, and let `CallControl` reconcile `screenshare` from it — plus a toast "Screen sharing was turned off by a room admin" so the user knows why.
jared added this to the Features 2026-Q4 milestone 2026-09-18 22:39:45 -04:00
jared added the bugpriority: mediumuxarea: calls labels 2026-09-18 22:39:45 -04:00
Author
Owner

Re-measured on the current stack (guard ee5f78b + fork 0.25.0-lotus.4), polling the sharer's client every second after an admin sets allow_screenshare:false:

+2s: host="Stop Screenshare" ecBtn=primary   dmTracks=[audio:live,video:live]   sfuShareTracks=2
+4s: host="hidden"           ecBtn=secondary dmTracks=[audio:ended,video:ended] sfuShareTracks=0

EC's own button, the captured getDisplayMedia tracks and our control bar all follow the SFU within ~2–4 s — the 30 s lag from the original observation is gone (it was the old guard's polling reconcile). So no fork call_state change needed.

What remained was the silent vanish, done in 34574178: a call-lifetime hook toasts "Screen sharing was turned off by a room admin." (or "Your camera was turned off by a room admin.") when a track ends while the room policy forbids it. Verified: toast visible +2 s after the revoke.

Re-measured on the current stack (guard `ee5f78b` + fork `0.25.0-lotus.4`), polling the sharer's client every second after an admin sets `allow_screenshare:false`: ``` +2s: host="Stop Screenshare" ecBtn=primary dmTracks=[audio:live,video:live] sfuShareTracks=2 +4s: host="hidden" ecBtn=secondary dmTracks=[audio:ended,video:ended] sfuShareTracks=0 ``` EC's own button, the captured `getDisplayMedia` tracks and our control bar all follow the SFU within ~2–4 s — the 30 s lag from the original observation is gone (it was the old guard's polling reconcile). So no fork `call_state` change needed. What remained was the silent vanish, done in `34574178`: a call-lifetime hook toasts **"Screen sharing was turned off by a room admin."** (or "Your camera was turned off by a room admin.") when a track ends while the room policy forbids it. Verified: toast visible +2 s after the revoke.
jared closed this issue 2026-09-19 12:21:31 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#223