Add crop to fit toggle to context menu. (#2107)
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user