fix(screen-share): never mute audio screen share track #9725
This commit is contained in:
parent
db0b861353
commit
d47e67c28c
|
@ -81,10 +81,6 @@ export class AudioMixerEffect {
|
||||||
this._mixedMediaStream = this._audioMixer.start();
|
this._mixedMediaStream = this._audioMixer.start();
|
||||||
this._mixedMediaTrack = this._mixedMediaStream.getTracks()[0];
|
this._mixedMediaTrack = this._mixedMediaStream.getTracks()[0];
|
||||||
|
|
||||||
// Sync the resulting mixed track enabled state with that of the track using the effect.
|
|
||||||
this.setMuted(!this._originalTrack.enabled);
|
|
||||||
this._originalTrack.enabled = true;
|
|
||||||
|
|
||||||
return this._mixedMediaStream;
|
return this._mixedMediaStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,9 +90,6 @@ export class AudioMixerEffect {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
stopEffect() {
|
stopEffect() {
|
||||||
// Match state of the original track with that of the mixer track, not doing so can
|
|
||||||
// result in an inconsistent state e.g. redux state is muted yet track is enabled.
|
|
||||||
this._originalTrack.enabled = this._mixedMediaTrack.enabled;
|
|
||||||
this._audioMixer.reset();
|
this._audioMixer.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +100,7 @@ export class AudioMixerEffect {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setMuted(muted: boolean) {
|
setMuted(muted: boolean) {
|
||||||
this._mixedMediaTrack.enabled = !muted;
|
this._originalTrack.enabled = !muted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,6 +109,6 @@ export class AudioMixerEffect {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
isMuted() {
|
isMuted() {
|
||||||
return !this._mixedMediaTrack.enabled;
|
return !this._originalTrack.enabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,7 @@ import { IconShareDesktop } from '../../../base/icons';
|
||||||
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
||||||
import { getLocalVideoTrack } from '../../../base/tracks';
|
import { isScreenVideoShared } from '../../../screen-share';
|
||||||
import { isScreenAudioShared } from '../../../screen-share';
|
|
||||||
|
|
||||||
type Props = AbstractButtonProps & {
|
type Props = AbstractButtonProps & {
|
||||||
|
|
||||||
|
@ -113,7 +112,6 @@ class ShareDesktopButton extends AbstractButton<Props, *> {
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
const localVideo = getLocalVideoTrack(state['features/base/tracks']);
|
|
||||||
let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
|
let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
|
||||||
const { enableFeaturesBasedOnToken } = state['features/base/config'];
|
const { enableFeaturesBasedOnToken } = state['features/base/config'];
|
||||||
|
|
||||||
|
@ -129,7 +127,7 @@ const mapStateToProps = state => {
|
||||||
return {
|
return {
|
||||||
_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
|
_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
|
||||||
_desktopSharingEnabled: desktopSharingEnabled,
|
_desktopSharingEnabled: desktopSharingEnabled,
|
||||||
_screensharing: (localVideo && localVideo.videoType === 'desktop') || isScreenAudioShared(state)
|
_screensharing: isScreenVideoShared(state)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue