Use more consistent names for layout types
This commit is contained in:
@@ -344,9 +344,9 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
grid: makeGridLayout(inputs),
|
grid: makeGridLayout(inputs),
|
||||||
"spotlight landscape": makeSpotlightLandscapeLayout(inputs),
|
"spotlight-landscape": makeSpotlightLandscapeLayout(inputs),
|
||||||
"spotlight portrait": makeSpotlightPortraitLayout(inputs),
|
"spotlight-portrait": makeSpotlightPortraitLayout(inputs),
|
||||||
"spotlight expanded": makeSpotlightExpandedLayout(inputs),
|
"spotlight-expanded": makeSpotlightExpandedLayout(inputs),
|
||||||
"one-on-one": makeOneOnOneLayout(inputs),
|
"one-on-one": makeOneOnOneLayout(inputs),
|
||||||
};
|
};
|
||||||
}, [gridBoundsObservable, spotlightAlignment, pipAlignment]);
|
}, [gridBoundsObservable, spotlightAlignment, pipAlignment]);
|
||||||
@@ -392,7 +392,7 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
);
|
);
|
||||||
// The grid tiles go *under* the spotlight in the portrait layout, but
|
// The grid tiles go *under* the spotlight in the portrait layout, but
|
||||||
// *over* the spotlight in the expanded layout
|
// *over* the spotlight in the expanded layout
|
||||||
return layout.type === "spotlight expanded" ? (
|
return layout.type === "spotlight-expanded" ? (
|
||||||
<>
|
<>
|
||||||
{fixedGrid}
|
{fixedGrid}
|
||||||
{scrollingGrid}
|
{scrollingGrid}
|
||||||
|
|||||||
@@ -89,19 +89,19 @@ export interface GridLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SpotlightLandscapeLayout {
|
export interface SpotlightLandscapeLayout {
|
||||||
type: "spotlight landscape";
|
type: "spotlight-landscape";
|
||||||
spotlight: MediaViewModel[];
|
spotlight: MediaViewModel[];
|
||||||
grid: UserMediaViewModel[];
|
grid: UserMediaViewModel[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SpotlightPortraitLayout {
|
export interface SpotlightPortraitLayout {
|
||||||
type: "spotlight portrait";
|
type: "spotlight-portrait";
|
||||||
spotlight: MediaViewModel[];
|
spotlight: MediaViewModel[];
|
||||||
grid: UserMediaViewModel[];
|
grid: UserMediaViewModel[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SpotlightExpandedLayout {
|
export interface SpotlightExpandedLayout {
|
||||||
type: "spotlight expanded";
|
type: "spotlight-expanded";
|
||||||
spotlight: MediaViewModel[];
|
spotlight: MediaViewModel[];
|
||||||
pip?: UserMediaViewModel;
|
pip?: UserMediaViewModel;
|
||||||
}
|
}
|
||||||
@@ -583,7 +583,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
const spotlightLandscapeLayout = combineLatest(
|
const spotlightLandscapeLayout = combineLatest(
|
||||||
[this.grid, this.spotlight],
|
[this.grid, this.spotlight],
|
||||||
(grid, spotlight): Layout => ({
|
(grid, spotlight): Layout => ({
|
||||||
type: "spotlight landscape",
|
type: "spotlight-landscape",
|
||||||
spotlight,
|
spotlight,
|
||||||
grid,
|
grid,
|
||||||
}),
|
}),
|
||||||
@@ -591,7 +591,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
const spotlightExpandedLayout = combineLatest(
|
const spotlightExpandedLayout = combineLatest(
|
||||||
[this.spotlight, this.pip],
|
[this.spotlight, this.pip],
|
||||||
(spotlight, pip): Layout => ({
|
(spotlight, pip): Layout => ({
|
||||||
type: "spotlight expanded",
|
type: "spotlight-expanded",
|
||||||
spotlight,
|
spotlight,
|
||||||
pip: pip ?? undefined,
|
pip: pip ?? undefined,
|
||||||
}),
|
}),
|
||||||
@@ -641,7 +641,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
return combineLatest(
|
return combineLatest(
|
||||||
[this.grid, this.spotlight],
|
[this.grid, this.spotlight],
|
||||||
(grid, spotlight): Layout => ({
|
(grid, spotlight): Layout => ({
|
||||||
type: "spotlight portrait",
|
type: "spotlight-portrait",
|
||||||
spotlight,
|
spotlight,
|
||||||
grid,
|
grid,
|
||||||
}),
|
}),
|
||||||
@@ -675,7 +675,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
);
|
);
|
||||||
|
|
||||||
public showSpeakingIndicators: Observable<boolean> = this.layout.pipe(
|
public showSpeakingIndicators: Observable<boolean> = this.layout.pipe(
|
||||||
map((l) => l.type !== "one-on-one" && l.type !== "spotlight expanded"),
|
map((l) => l.type !== "one-on-one" && l.type !== "spotlight-expanded"),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
shareReplay(1),
|
shareReplay(1),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user