From 1f7c5529e9c9e488cd32a560daad53af61e9db06 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Fri, 20 Jan 2017 14:32:30 -0600 Subject: [PATCH] fix(remotecontrol): Pin the controlled participant only on remote control permissions granted --- modules/UI/videolayout/RemoteVideo.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js index 4248a6bad..21b780f3b 100644 --- a/modules/UI/videolayout/RemoteVideo.js +++ b/modules/UI/videolayout/RemoteVideo.js @@ -246,9 +246,12 @@ RemoteVideo.prototype._requestRemoteControlPermissions = function () { {user: this.user.getDisplayName() || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME} ); - let pinnedId = this.VideoLayout.getPinnedId(); - if(pinnedId !== this.id) { - this.VideoLayout.handleVideoThumbClicked(this.id); + if(result === true) {//the remote control permissions has been granted + // pin the controlled participant + let pinnedId = this.VideoLayout.getPinnedId(); + if(pinnedId !== this.id) { + this.VideoLayout.handleVideoThumbClicked(this.id); + } } }, error => { logger.error(error);