Merge branch 'livekit' into renovate/livekit-client-2.x

This commit is contained in:
Robin
2024-02-21 08:50:01 -05:00
21 changed files with 824 additions and 1885 deletions

View File

@@ -167,6 +167,12 @@ export class UserMediaTileViewModel extends BaseTileViewModel {
*/
public readonly videoEnabled: StateObservable<boolean>;
private readonly _cropVideo = new BehaviorSubject(true);
/**
* Whether the tile video should be contained inside the tile or be cropped to fit.
*/
public readonly cropVideo = state(this._cropVideo);
public constructor(
id: string,
member: RoomMember | undefined,
@@ -205,6 +211,10 @@ export class UserMediaTileViewModel extends BaseTileViewModel {
this._locallyMuted.next(!this._locallyMuted.value);
}
public toggleFitContain(): void {
this._cropVideo.next(!this._cropVideo.value);
}
public setLocalVolume(value: number): void {
this._localVolume.next(value);
}