Browse Source

fix(screenshare) disable sound when presenter stops sharing

factor2
William Liang 3 years ago
parent
commit
131eed0f62

+ 4
- 2
react/features/base/participants/actions.js View File

@@ -378,6 +378,7 @@ export function hiddenParticipantLeft(id) {
378 378
  * participant is allowed to not specify an associated {@code JitsiConference}
379 379
  * instance.
380 380
  * @param {boolean} isReplaced - Whether the participant is to be replaced in the meeting.
381
+ * @param {boolean} isVirtualScreenshareParticipant - Whether the participant is a virtual screen share participant.
381 382
  * @returns {{
382 383
  *     type: PARTICIPANT_LEFT,
383 384
  *     participant: {
@@ -386,13 +387,14 @@ export function hiddenParticipantLeft(id) {
386 387
  *     }
387 388
  * }}
388 389
  */
389
-export function participantLeft(id, conference, isReplaced) {
390
+export function participantLeft(id, conference, isReplaced, isVirtualScreenshareParticipant) {
390 391
     return {
391 392
         type: PARTICIPANT_LEFT,
392 393
         participant: {
393 394
             conference,
394 395
             id,
395
-            isReplaced
396
+            isReplaced,
397
+            isVirtualScreenshareParticipant
396 398
         }
397 399
     };
398 400
 }

+ 2
- 2
react/features/base/participants/subscriber.js View File

@@ -52,14 +52,14 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
52 52
     }
53 53
 
54 54
     if (localScreenShare && !newLocalSceenshareSourceName) {
55
-        dispatch(participantLeft(localScreenShare.id, conference));
55
+        dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
56 56
     }
57 57
 
58 58
     const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);
59 59
     const addedScreenshareSourceNames = _.difference(currentScreenshareSourceNames, previousScreenshareSourceNames);
60 60
 
61 61
     if (removedScreenshareSourceNames.length) {
62
-        removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference)));
62
+        removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference, undefined, true)));
63 63
     }
64 64
 
65 65
     if (addedScreenshareSourceNames.length) {

Loading…
Cancel
Save