fix(remotecontrol): Pin the controlled participant only on remote control permissions granted

This commit is contained in:
hristoterezov 2017-01-20 14:32:30 -06:00
parent 0453346cf4
commit 1f7c5529e9
1 changed files with 6 additions and 3 deletions

View File

@ -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);