Explorar el Código

Fixes a problem not showing remote video menu in case of all moderators. (#2130)

Removes hasRemoteVideoMenu from RemoteVideo.
In some cases where mod_muc_allowners is enabled we do not see the remote video menu. The problem was in the order of initialization of remote video component.
RemoteVideo#constructor -> Remotevideo#addaddRemoteVideoContainer -> Remotevideo#addRemoteVideoMenu  -> RemoteVideo#hasRemoteVideoMenu = true
Then in VideoLayout#showModeratorIndicator -> !remoteVideo.hasRemoteVideoMenu -> remoteVideo.addRemoteVideoMenu().
j8
Дамян Минков hace 8 años
padre
commit
90070d9e9f
Se han modificado 2 ficheros con 6 adiciones y 13 borrados
  1. 5
    7
      modules/UI/videolayout/RemoteVideo.js
  2. 1
    6
      modules/UI/videolayout/VideoLayout.js

+ 5
- 7
modules/UI/videolayout/RemoteVideo.js Ver fichero

41
     this.videoSpanId = `participant_${this.id}`;
41
     this.videoSpanId = `participant_${this.id}`;
42
     SmallVideo.call(this, VideoLayout);
42
     SmallVideo.call(this, VideoLayout);
43
     this._audioStreamElement = null;
43
     this._audioStreamElement = null;
44
-    this.hasRemoteVideoMenu = false;
45
     this._supportsRemoteControl = false;
44
     this._supportsRemoteControl = false;
46
     this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP
45
     this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP
47
         ? 'left bottom' : 'top center';
46
         ? 'left bottom' : 'top center';
298
  *
297
  *
299
  * @param isMuted the new muted state to update to
298
  * @param isMuted the new muted state to update to
300
  */
299
  */
301
-RemoteVideo.prototype.updateRemoteVideoMenu = function(
302
-        isMuted = this.isAudioMuted) {
303
-    this.isAudioMuted = isMuted;
300
+RemoteVideo.prototype.updateRemoteVideoMenu = function(isMuted) {
301
+
302
+    if (typeof isMuted !== 'undefined') {
303
+        this.isAudioMuted = isMuted;
304
+    }
304
 
305
 
305
     this._generatePopupContent();
306
     this._generatePopupContent();
306
 };
307
 };
343
     }
344
     }
344
 
345
 
345
     this._generatePopupContent();
346
     this._generatePopupContent();
346
-
347
-    this.hasRemoteVideoMenu = true;
348
 };
347
 };
349
 
348
 
350
 /**
349
 /**
641
     if (menuSpan.length) {
640
     if (menuSpan.length) {
642
         ReactDOM.unmountComponentAtNode(menuSpan.get(0));
641
         ReactDOM.unmountComponentAtNode(menuSpan.get(0));
643
         menuSpan.remove();
642
         menuSpan.remove();
644
-        this.hasRemoteVideoMenu = false;
645
     }
643
     }
646
 };
644
 };
647
 
645
 

+ 1
- 6
modules/UI/videolayout/VideoLayout.js Ver fichero

559
                 remoteVideo.addModeratorIndicator();
559
                 remoteVideo.addModeratorIndicator();
560
             }
560
             }
561
 
561
 
562
-            if (isModerator) {
563
-                // We are moderator, but user is not - add menu
564
-                if (!remoteVideo.hasRemoteVideoMenu) {
565
-                    remoteVideo.addRemoteVideoMenu();
566
-                }
567
-            }
562
+            remoteVideo.updateRemoteVideoMenu();
568
         });
563
         });
569
     },
564
     },
570
 
565
 

Loading…
Cancelar
Guardar