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.
This commit is contained in:
Leonard Kim 2017-05-31 09:31:26 -07:00 committed by yanas
parent 1a87ee5f93
commit 73dd7440d0
1 changed files with 4 additions and 1 deletions

View File

@ -436,9 +436,12 @@ RemoteVideo.prototype._setAudioVolume = function (scale, newVal) {
* @param force to work even if popover is not visible
*/
RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
this.isAudioMuted = isMuted;
if (!this.popover) {
return;
}
// generate content, translate it and add it to document only if
// popover is visible or we force to do so.
if(this.popover.popoverShown || force) {