mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
This implements the new ringing UI by showing a placeholder tile for the participant being dialed, rather than an overlay.
36 lines
949 B
TypeScript
36 lines
949 B
TypeScript
/*
|
|
Copyright 2024 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 { type Behavior } from "./Behavior";
|
|
import { type MediaViewModel } from "./media/MediaViewModel";
|
|
import { type RingingMediaViewModel } from "./media/RingingMediaViewModel";
|
|
import { type UserMediaViewModel } from "./media/UserMediaViewModel";
|
|
|
|
let nextId = 0;
|
|
function createId(): string {
|
|
return (nextId++).toString();
|
|
}
|
|
|
|
export class GridTileViewModel {
|
|
public readonly id = createId();
|
|
|
|
public constructor(
|
|
public readonly media$: Behavior<
|
|
UserMediaViewModel | RingingMediaViewModel
|
|
>,
|
|
) {}
|
|
}
|
|
|
|
export class SpotlightTileViewModel {
|
|
public constructor(
|
|
public readonly media$: Behavior<MediaViewModel[]>,
|
|
public readonly maximised$: Behavior<boolean>,
|
|
) {}
|
|
}
|
|
|
|
export type TileViewModel = GridTileViewModel | SpotlightTileViewModel;
|