|
@@ -752,6 +752,9 @@ export default {
|
752
|
752
|
if (!this._localTracksInitialized) {
|
753
|
753
|
this.videoMuted = mute;
|
754
|
754
|
|
|
755
|
+ return;
|
|
756
|
+ } else if (localVideo && localVideo.isMuted() === mute) {
|
|
757
|
+ // NO-OP
|
755
|
758
|
return;
|
756
|
759
|
}
|
757
|
760
|
|
|
@@ -1994,7 +1997,23 @@ export default {
|
1994
|
1997
|
);
|
1995
|
1998
|
|
1996
|
1999
|
APP.UI.addListener(UIEvents.TOGGLE_AUDIO_ONLY, audioOnly => {
|
1997
|
|
- this.muteVideo(audioOnly);
|
|
2000
|
+
|
|
2001
|
+ // FIXME On web video track is stored both in redux and in
|
|
2002
|
+ // 'localVideo' field, video is attempted to be unmuted twice when
|
|
2003
|
+ // turning off the audio only mode. This will crash the app with
|
|
2004
|
+ // 'unmute operation is already in progress'.
|
|
2005
|
+ // Because there's no logic in redux about creating new track in
|
|
2006
|
+ // case unmute when not track exists the things have to go through
|
|
2007
|
+ // muteVideo logic in such case.
|
|
2008
|
+ const tracks = APP.store.getState()['features/base/tracks'];
|
|
2009
|
+ const isTrackInRedux
|
|
2010
|
+ = Boolean(
|
|
2011
|
+ tracks.find(
|
|
2012
|
+ track => track.jitsiTrack
|
|
2013
|
+ && track.jitsiTrack.getType() === 'video'));
|
|
2014
|
+ if (!isTrackInRedux) {
|
|
2015
|
+ this.muteVideo(audioOnly);
|
|
2016
|
+ }
|
1998
|
2017
|
|
1999
|
2018
|
// Immediately update the UI by having remote videos and the large
|
2000
|
2019
|
// video update themselves instead of waiting for some other event
|