Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web) ✨ new config to start with tileView #14504

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,10 @@ var config = {
// tileView: {
// // Whether tileview should be disabled.
// disabled: false,
// // If true start the video in tile view. It is enforced in all cases,
// // including jibri recording, screen sharing etc. The only exception are local
// // user preference, which comes before everything else, or if tile view is disabled.
// force: false,
// // The optimal number of tiles that are going to be shown in tile view. Depending on the screen size it may
// // not be possible to show the exact number of participants specified here.
// numberOfVisibleTiles: 25,
Expand Down
1 change: 1 addition & 0 deletions react/features/base/config/configType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ export interface IConfig {
};
tileView?: {
disabled?: boolean;
force?: boolean;
numberOfVisibleTiles?: number;
};
tokenAuthUrl?: string;
Expand Down
11 changes: 9 additions & 2 deletions react/features/video-layout/functions.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ export function shouldDisplayTileView(state: IReduxState) {
return false;
}

const { tileView } = state['features/base/config'];

if (tileView?.force) {
return true;
}


const participantCount = getParticipantCount(state);
const { iAmRecorder } = state['features/base/config'];

Expand All @@ -99,7 +106,7 @@ export function shouldDisplayTileView(state: IReduxState) {
// It's a 1-on-1 meeting
|| participantCount < 3

// There is a shared YouTube video in the meeting
// Screen or YouTube video is shared in the meeting
|| isVideoPlaying(state)

// We want jibri to use stage view by default
Expand Down Expand Up @@ -132,7 +139,7 @@ export function updateAutoPinnedParticipant(
// Unpin the screen share when the screen sharing participant leaves. Switch to tile view if no other
// participant was pinned before screen share was auto-pinned, pin the previously pinned participant otherwise.
if (!remoteScreenShares?.length) {
let participantId = null;
let participantId: string | null = null;

if (pinned && !screenShares.find(share => share === pinned.id)) {
participantId = pinned.id;
Expand Down