浏览代码

fix(filmstrip): prevent error on updating indicators for shared video

Shared video (youtube videos) do not have indicator icons about
dominant speaker and raised hand. Add a check to see if the
indicator icon container exists before trying to attach react
icons to it. The error thrown didn't seem to be causing any
UI issues though.

While this truthy check before doing ReactDOM.render seems
like it should be a general practice, I'm hesistatnt to make
the change broadly because it hasn't been a problem so far.
master
Leonard Kim 7 年前
父节点
当前提交
3aedce11f2
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      modules/UI/videolayout/SmallVideo.js

+ 4
- 0
modules/UI/videolayout/SmallVideo.js 查看文件

@@ -776,6 +776,10 @@ SmallVideo.prototype.updateIndicators = function() {
776 776
     const indicatorToolbar
777 777
         = this.container.querySelector('.videocontainer__toptoolbar');
778 778
 
779
+    if (!indicatorToolbar) {
780
+        return;
781
+    }
782
+
779 783
     const iconSize = UIUtil.getIndicatorFontSize();
780 784
     const showConnectionIndicator = this.videoIsHovered
781 785
         || !interfaceConfig.CONNECTION_INDICATOR_AUTO_HIDE_ENABLED;

正在加载...
取消
保存