fix(remote-control): when multistream is enabled
The remote control controller events were sent for the camera participant instead of the screen sharing one.
This commit is contained in:
parent
4d41d36020
commit
627027b167
|
@ -1,5 +1,10 @@
|
|||
// @flow
|
||||
|
||||
import {
|
||||
getParticipantById,
|
||||
getVirtualScreenshareParticipantByOwnerId,
|
||||
getVirtualScreenshareParticipantOwnerId
|
||||
} from '../base/participants';
|
||||
import { StateListenerRegistry } from '../base/redux';
|
||||
|
||||
import { resume, pause } from './actions';
|
||||
|
@ -17,6 +22,22 @@ StateListenerRegistry.register(
|
|||
return undefined;
|
||||
}
|
||||
|
||||
const participant = getParticipantById(state, participantId);
|
||||
|
||||
if (participant?.isVirtualScreenshareParticipant) {
|
||||
// multistream support is enabled and the user has selected the desktop sharing thumbnail.
|
||||
const id = getVirtualScreenshareParticipantOwnerId(participantId);
|
||||
|
||||
return id === controlled;
|
||||
}
|
||||
|
||||
const virtualParticipant = getVirtualScreenshareParticipantByOwnerId(state, participantId);
|
||||
|
||||
if (virtualParticipant) { // multistream is enabled and the user has selected the camera thumbnail.
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return controlled === participantId;
|
||||
},
|
||||
/* listener */ (isControlledParticipantOnStage, { dispatch }) => {
|
||||
|
|
Loading…
Reference in New Issue