fix(screenshare) disable sound when presenter stops sharing

This commit is contained in:
William Liang 2022-06-27 13:17:25 -04:00 committed by Jaya Allamsetty
parent 77da65b8ea
commit 131eed0f62
2 changed files with 6 additions and 4 deletions

View File

@ -378,6 +378,7 @@ export function hiddenParticipantLeft(id) {
* participant is allowed to not specify an associated {@code JitsiConference}
* instance.
* @param {boolean} isReplaced - Whether the participant is to be replaced in the meeting.
* @param {boolean} isVirtualScreenshareParticipant - Whether the participant is a virtual screen share participant.
* @returns {{
* type: PARTICIPANT_LEFT,
* participant: {
@ -386,13 +387,14 @@ export function hiddenParticipantLeft(id) {
* }
* }}
*/
export function participantLeft(id, conference, isReplaced) {
export function participantLeft(id, conference, isReplaced, isVirtualScreenshareParticipant) {
return {
type: PARTICIPANT_LEFT,
participant: {
conference,
id,
isReplaced
isReplaced,
isVirtualScreenshareParticipant
}
};
}

View File

@ -52,14 +52,14 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
}
if (localScreenShare && !newLocalSceenshareSourceName) {
dispatch(participantLeft(localScreenShare.id, conference));
dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
}
const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);
const addedScreenshareSourceNames = _.difference(currentScreenshareSourceNames, previousScreenshareSourceNames);
if (removedScreenshareSourceNames.length) {
removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference)));
removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference, undefined, true)));
}
if (addedScreenshareSourceNames.length) {