Merge pull request #822 from robintown/reduce-local-feed
Reduce the size of the local feed in 1:1 calls at small window sizes
This commit is contained in:
commit
6b021b9f70
1 changed files with 10 additions and 6 deletions
|
@ -106,8 +106,8 @@ function isInside([x, y]: number[], targetTile: TilePosition): boolean {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getPipGap = (gridAspectRatio: number): number =>
|
const getPipGap = (gridAspectRatio: number, gridWidth: number): number =>
|
||||||
gridAspectRatio < 1 ? 12 : 24;
|
gridAspectRatio < 1 || gridWidth < 700 ? 12 : 24;
|
||||||
|
|
||||||
function getTilePositions(
|
function getTilePositions(
|
||||||
tileCount: number,
|
tileCount: number,
|
||||||
|
@ -155,9 +155,10 @@ function getOneOnOneLayoutTilePositions(
|
||||||
|
|
||||||
const gridAspectRatio = gridWidth / gridHeight;
|
const gridAspectRatio = gridWidth / gridHeight;
|
||||||
|
|
||||||
const pipWidth = gridAspectRatio < 1 ? 114 : 230;
|
const smallPip = gridAspectRatio < 1 || gridWidth < 700;
|
||||||
const pipHeight = gridAspectRatio < 1 ? 163 : 155;
|
const pipWidth = smallPip ? 114 : 230;
|
||||||
const pipGap = getPipGap(gridAspectRatio);
|
const pipHeight = smallPip ? 163 : 155;
|
||||||
|
const pipGap = getPipGap(gridAspectRatio, gridWidth);
|
||||||
|
|
||||||
const pipMinX = remotePosition.x + pipGap;
|
const pipMinX = remotePosition.x + pipGap;
|
||||||
const pipMinY = remotePosition.y + pipGap;
|
const pipMinY = remotePosition.y + pipGap;
|
||||||
|
@ -1045,7 +1046,10 @@ export function VideoGrid({
|
||||||
if (last) {
|
if (last) {
|
||||||
const remotePosition = tilePositions[1];
|
const remotePosition = tilePositions[1];
|
||||||
|
|
||||||
const pipGap = getPipGap(gridBounds.width / gridBounds.height);
|
const pipGap = getPipGap(
|
||||||
|
gridBounds.width / gridBounds.height,
|
||||||
|
gridBounds.width
|
||||||
|
);
|
||||||
const pipMinX = remotePosition.x + pipGap;
|
const pipMinX = remotePosition.x + pipGap;
|
||||||
const pipMinY = remotePosition.y + pipGap;
|
const pipMinY = remotePosition.y + pipGap;
|
||||||
const pipMaxX =
|
const pipMaxX =
|
||||||
|
|
Loading…
Add table
Reference in a new issue