@@ -39,6 +39,7 @@ export function updateRemoteParticipants(store: IStore, force?: boolean, partici
3939 const defaultRemoteDisplayName = config ?. defaultRemoteDisplayName ?? 'Fellow Jitster' ;
4040 const dominant = dominantSpeaker ? getParticipantById ( state , dominantSpeaker ) : undefined ;
4141 let dominantSpeakerSlot = 0 ;
42+ const previousSpeakers = new Set ( activeSpeakers ) ;
4243 const remoteParticipants = new Map ( sortedRemoteParticipants ) ;
4344 const screenShareParticipants = sortedRemoteVirtualScreenshareParticipants
4445 ? [ ...sortedRemoteVirtualScreenshareParticipants . keys ( ) ] : [ ] ;
@@ -53,7 +54,7 @@ export function updateRemoteParticipants(store: IStore, force?: boolean, partici
5354 acc . push ( screenshare ) ;
5455 remoteParticipants . delete ( ownerId ) ;
5556 remoteParticipants . delete ( screenshare ) ;
56- activeSpeakers . delete ( ownerId ) ;
57+ previousSpeakers . delete ( ownerId ) ;
5758
5859 return acc ;
5960 } , [ ] ) ;
@@ -74,7 +75,7 @@ export function updateRemoteParticipants(store: IStore, force?: boolean, partici
7475
7576 // Construct the list of speakers to be shown.
7677 if ( slotsForSpeakers > 0 ) {
77- Array . from ( activeSpeakers ) . slice ( 0 , slotsForSpeakers ) . forEach ( ( speakerId : string ) => {
78+ Array . from ( previousSpeakers ) . slice ( 0 , slotsForSpeakers ) . forEach ( ( speakerId : string ) => {
7879 speakers . push ( speakerId ) ;
7980 remoteParticipants . delete ( speakerId ) ;
8081 } ) ;
0 commit comments