From 5261f61110df4d33473f81b29a10daf971ae6b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 30 Jul 2019 15:01:50 +0200 Subject: [PATCH] conference: don't pin participants on the JVB When a participant is pinned in the UI we then proceed to mark it as selected on the JVB. This will make the participant part of the last N set and will receive the highest (or configured highest) video quality. Pinning a participant at the JVB level just makes sure it will be part of the last N set. Since only one participant can be pinned in the UI, there is no point in pinning it at the JVB level, since selecting it already achieved the same result. --- react/features/base/conference/middleware.js | 26 -------------------- 1 file changed, 26 deletions(-) diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index fdd25670a..deb5cc94a 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -14,7 +14,6 @@ import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../connection'; import { JitsiConferenceErrors } from '../lib-jitsi-meet'; import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media'; import { - getLocalParticipant, getParticipantById, getPinnedParticipant, PARTICIPANT_UPDATED, @@ -46,7 +45,6 @@ import { _addLocalTracksToConference, forEachConference, getCurrentConference, - _handleParticipantError, _removeLocalTracksFromConference } from './functions'; @@ -462,30 +460,6 @@ function _pinParticipant({ getState }, next, action) { })); } - // The following condition prevents signaling to pin local participant and - // shared videos. The logic is: - // - If we have an ID, we check if the participant identified by that ID is - // local or a bot/fake participant (such as with shared video). - // - If we don't have an ID (i.e. no participant identified by an ID), we - // check for local participant. If she's currently pinned, then this - // action will unpin her and that's why we won't signal here too. - let pin; - - if (participantById) { - pin = !participantById.local && !participantById.isFakeParticipant; - } else { - const localParticipant = getLocalParticipant(participants); - - pin = !localParticipant || !localParticipant.pinned; - } - if (pin) { - try { - conference.pinParticipant(id); - } catch (err) { - _handleParticipantError(err); - } - } - return next(action); }