Merge pull request #15790 from JoVictorNunes/issue-15760

fix: mute external video when in echo test
This commit is contained in:
Ramón Souza 2022-10-26 13:32:18 -03:00 committed by GitHub
commit 60efe4794a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -98,6 +98,7 @@ class AudioSettings extends React.Component {
componentDidMount() {
const { inputDeviceId, outputDeviceId } = this.state;
Session.set('inEchoTest', true);
this._isMounted = true;
// Guarantee initial in/out devices are initialized on all ends
this.setInputDevice(inputDeviceId);
@ -107,6 +108,7 @@ class AudioSettings extends React.Component {
componentWillUnmount() {
const { stream } = this.state;
Session.set('inEchoTest', false);
this._mounted = false;
if (stream) {

View File

@ -404,10 +404,11 @@ class VideoPlayer extends Component {
}
getMuted() {
const { mutedByEchoTest, muted } = this.state;
const intPlayer = this.player && this.player.getInternalPlayer();
const { isPresenter } = this.props;
const { muted } = this.state;
const intPlayer = this?.player?.getInternalPlayer?.();
return (intPlayer && intPlayer.isMuted && intPlayer.isMuted?.() && !mutedByEchoTest) || muted;
return isPresenter ? intPlayer?.isMuted?.() : muted;
}
autoPlayBlockDetected() {