feat(api) allow always hiding remote videos for 1-1 calls

This commit is contained in:
Tudor-Ovidiu Avram 2021-06-10 14:51:51 +03:00 committed by Дамян Минков
parent d4b6ac6c3a
commit 6b095b9794
2 changed files with 6 additions and 2 deletions

View File

@ -392,7 +392,9 @@ var config = {
// enableClosePage: false, // enableClosePage: false,
// Disable hiding of remote thumbnails when in a 1-on-1 conference call. // Disable hiding of remote thumbnails when in a 1-on-1 conference call.
// disable1On1Mode: false, // Setting this to null, will also disable showing the remote videos
// when the toolbar is shown on mouse movements
// disable1On1Mode: null | false | true,
// Default language for the user interface. // Default language for the user interface.
// defaultLanguage: 'en', // defaultLanguage: 'en',

View File

@ -66,6 +66,7 @@ export function shouldRemoteVideosBeVisible(state: Object) {
// in the filmstrip. // in the filmstrip.
const participantCount = getParticipantCountWithFake(state); const participantCount = getParticipantCountWithFake(state);
let pinnedParticipant; let pinnedParticipant;
const { disable1On1Mode } = state['features/base/config'];
return Boolean( return Boolean(
participantCount > 2 participantCount > 2
@ -73,11 +74,12 @@ export function shouldRemoteVideosBeVisible(state: Object) {
// Always show the filmstrip when there is another participant to // Always show the filmstrip when there is another participant to
// show and the local video is pinned, or the toolbar is displayed. // show and the local video is pinned, or the toolbar is displayed.
|| (participantCount > 1 || (participantCount > 1
&& disable1On1Mode !== null
&& (state['features/toolbox'].visible && (state['features/toolbox'].visible
|| ((pinnedParticipant = getPinnedParticipant(state)) || ((pinnedParticipant = getPinnedParticipant(state))
&& pinnedParticipant.local))) && pinnedParticipant.local)))
|| state['features/base/config'].disable1On1Mode); || disable1On1Mode);
} }
/** /**