Skip to content

Commit

Permalink
fix(filmstrip): prevent error on updating indicators for shared video
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
virtuacoplenny authored and yanas committed Dec 19, 2017
1 parent f0a180c commit 3aedce1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/UI/videolayout/SmallVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ SmallVideo.prototype.updateIndicators = function() {
const indicatorToolbar
= this.container.querySelector('.videocontainer__toptoolbar');

if (!indicatorToolbar) {
return;
}

const iconSize = UIUtil.getIndicatorFontSize();
const showConnectionIndicator = this.videoIsHovered
|| !interfaceConfig.CONNECTION_INDICATOR_AUTO_HIDE_ENABLED;
Expand Down

0 comments on commit 3aedce1

Please sign in to comment.