Explorar el Código

fix(screen-share): never mute audio screen share track #9725

master
Andrei Gavrilescu hace 4 años
padre
commit
d47e67c28c
No account linked to committer's email address

+ 2
- 9
react/features/stream-effects/audio-mixer/AudioMixerEffect.js Ver fichero

@@ -81,10 +81,6 @@ export class AudioMixerEffect {
81 81
         this._mixedMediaStream = this._audioMixer.start();
82 82
         this._mixedMediaTrack = this._mixedMediaStream.getTracks()[0];
83 83
 
84
-        // Sync the resulting mixed track enabled state with that of the track using the effect.
85
-        this.setMuted(!this._originalTrack.enabled);
86
-        this._originalTrack.enabled = true;
87
-
88 84
         return this._mixedMediaStream;
89 85
     }
90 86
 
@@ -94,9 +90,6 @@ export class AudioMixerEffect {
94 90
      * @returns {void}
95 91
      */
96 92
     stopEffect() {
97
-        // Match state of the original track with that of the mixer track, not doing so can
98
-        // result in an inconsistent state e.g. redux state is muted yet track is enabled.
99
-        this._originalTrack.enabled = this._mixedMediaTrack.enabled;
100 93
         this._audioMixer.reset();
101 94
     }
102 95
 
@@ -107,7 +100,7 @@ export class AudioMixerEffect {
107 100
      * @returns {void}
108 101
      */
109 102
     setMuted(muted: boolean) {
110
-        this._mixedMediaTrack.enabled = !muted;
103
+        this._originalTrack.enabled = !muted;
111 104
     }
112 105
 
113 106
     /**
@@ -116,6 +109,6 @@ export class AudioMixerEffect {
116 109
      * @returns {boolean}
117 110
      */
118 111
     isMuted() {
119
-        return !this._mixedMediaTrack.enabled;
112
+        return !this._originalTrack.enabled;
120 113
     }
121 114
 }

+ 2
- 4
react/features/toolbox/components/web/ShareDesktopButton.js Ver fichero

@@ -5,8 +5,7 @@ import { IconShareDesktop } from '../../../base/icons';
5 5
 import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
6 6
 import { connect } from '../../../base/redux';
7 7
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
8
-import { getLocalVideoTrack } from '../../../base/tracks';
9
-import { isScreenAudioShared } from '../../../screen-share';
8
+import { isScreenVideoShared } from '../../../screen-share';
10 9
 
11 10
 type Props = AbstractButtonProps & {
12 11
 
@@ -113,7 +112,6 @@ class ShareDesktopButton extends AbstractButton<Props, *> {
113 112
  * @returns {Object}
114 113
  */
115 114
 const mapStateToProps = state => {
116
-    const localVideo = getLocalVideoTrack(state['features/base/tracks']);
117 115
     let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
118 116
     const { enableFeaturesBasedOnToken } = state['features/base/config'];
119 117
 
@@ -129,7 +127,7 @@ const mapStateToProps = state => {
129 127
     return {
130 128
         _desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
131 129
         _desktopSharingEnabled: desktopSharingEnabled,
132
-        _screensharing: (localVideo && localVideo.videoType === 'desktop') || isScreenAudioShared(state)
130
+        _screensharing: isScreenVideoShared(state)
133 131
     };
134 132
 };
135 133
 

Loading…
Cancelar
Guardar