mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
d70e6cf81b
Introduce a tripwire component that listens to RoomEvent.ActiveSpeakersChanged imperatively and forces a single re-render of its host only when an active speaker has none of their tiles within the visible span (maxVisibleTiles). That re-render re-runs useVisualStableUpdate, which reads live isSpeaking state and performs the actual tile swap. Speakers already visible are ignored, so this costs zero React work in the common case. This lets us drop the ActiveSpeakersChanged subscription from useTracks in the StageLayout upstream (updateOnlyOn: []), which was re-rendering the whole stage on every speaker change.