103 lines
2.3 KiB
TypeScript
103 lines
2.3 KiB
TypeScript
|
|
/*
|
||
|
|
Copyright 2025 New Vector Ltd.
|
||
|
|
|
||
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||
|
|
Please see LICENSE in the repository root for full details.
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { GridTileViewModel, SpotlightTileViewModel } from "./TileViewModel.ts";
|
||
|
|
import { MediaViewModel, UserMediaViewModel } from "./MediaViewModel.ts";
|
||
|
|
|
||
|
|
export interface GridLayoutMedia {
|
||
|
|
type: "grid";
|
||
|
|
spotlight?: MediaViewModel[];
|
||
|
|
grid: UserMediaViewModel[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightLandscapeLayoutMedia {
|
||
|
|
type: "spotlight-landscape";
|
||
|
|
spotlight: MediaViewModel[];
|
||
|
|
grid: UserMediaViewModel[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightPortraitLayoutMedia {
|
||
|
|
type: "spotlight-portrait";
|
||
|
|
spotlight: MediaViewModel[];
|
||
|
|
grid: UserMediaViewModel[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightExpandedLayoutMedia {
|
||
|
|
type: "spotlight-expanded";
|
||
|
|
spotlight: MediaViewModel[];
|
||
|
|
pip?: UserMediaViewModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface OneOnOneLayoutMedia {
|
||
|
|
type: "one-on-one";
|
||
|
|
local: UserMediaViewModel;
|
||
|
|
remote: UserMediaViewModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface PipLayoutMedia {
|
||
|
|
type: "pip";
|
||
|
|
spotlight: MediaViewModel[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export type LayoutMedia =
|
||
|
|
| GridLayoutMedia
|
||
|
|
| SpotlightLandscapeLayoutMedia
|
||
|
|
| SpotlightPortraitLayoutMedia
|
||
|
|
| SpotlightExpandedLayoutMedia
|
||
|
|
| OneOnOneLayoutMedia
|
||
|
|
| PipLayoutMedia;
|
||
|
|
|
||
|
|
export interface GridLayout {
|
||
|
|
type: "grid";
|
||
|
|
spotlight?: SpotlightTileViewModel;
|
||
|
|
grid: GridTileViewModel[];
|
||
|
|
setVisibleTiles: (value: number) => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightLandscapeLayout {
|
||
|
|
type: "spotlight-landscape";
|
||
|
|
spotlight: SpotlightTileViewModel;
|
||
|
|
grid: GridTileViewModel[];
|
||
|
|
setVisibleTiles: (value: number) => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightPortraitLayout {
|
||
|
|
type: "spotlight-portrait";
|
||
|
|
spotlight: SpotlightTileViewModel;
|
||
|
|
grid: GridTileViewModel[];
|
||
|
|
setVisibleTiles: (value: number) => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SpotlightExpandedLayout {
|
||
|
|
type: "spotlight-expanded";
|
||
|
|
spotlight: SpotlightTileViewModel;
|
||
|
|
pip?: GridTileViewModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface OneOnOneLayout {
|
||
|
|
type: "one-on-one";
|
||
|
|
local: GridTileViewModel;
|
||
|
|
remote: GridTileViewModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface PipLayout {
|
||
|
|
type: "pip";
|
||
|
|
spotlight: SpotlightTileViewModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* A layout defining the media tiles present on screen and their visual
|
||
|
|
* arrangement.
|
||
|
|
*/
|
||
|
|
export type Layout =
|
||
|
|
| GridLayout
|
||
|
|
| SpotlightLandscapeLayout
|
||
|
|
| SpotlightPortraitLayout
|
||
|
|
| SpotlightExpandedLayout
|
||
|
|
| OneOnOneLayout
|
||
|
|
| PipLayout;
|