浏览代码

fix(remote-video): update remote video menu if it exists

In RemoteVideo, creation of the RemoteVideoMenu (popover) is
skipped if in filmstrip only mode. However, updateRemoteVideoMenu
is called by other components, and that tries to access popover
and will error.

Add a defensive check for now as filmstrip is being rewritten
for react.
j8
Leonard Kim 8 年前
父节点
当前提交
73dd7440d0
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      modules/UI/videolayout/RemoteVideo.js

+ 4
- 1
modules/UI/videolayout/RemoteVideo.js 查看文件

436
  * @param force to work even if popover is not visible
436
  * @param force to work even if popover is not visible
437
  */
437
  */
438
 RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
438
 RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
439
-
440
     this.isAudioMuted = isMuted;
439
     this.isAudioMuted = isMuted;
441
 
440
 
441
+    if (!this.popover) {
442
+        return;
443
+    }
444
+
442
     // generate content, translate it and add it to document only if
445
     // generate content, translate it and add it to document only if
443
     // popover is visible or we force to do so.
446
     // popover is visible or we force to do so.
444
     if(this.popover.popoverShown || force) {
447
     if(this.popover.popoverShown || force) {

正在加载...
取消
保存