Split Linux screensharing audio tracks, Rework screensharing functionality and layout This will need some refactoring soon
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import {
|
|
Component,
|
|
HostListener,
|
|
OnInit,
|
|
input,
|
|
output,
|
|
signal
|
|
} from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
import { ScreenShareQuality, SCREEN_SHARE_QUALITY_OPTIONS } from '../../../core/services/webrtc/screen-share.config';
|
|
|
|
@Component({
|
|
selector: 'app-screen-share-quality-dialog',
|
|
standalone: true,
|
|
imports: [CommonModule],
|
|
templateUrl: './screen-share-quality-dialog.component.html'
|
|
})
|
|
export class ScreenShareQualityDialogComponent implements OnInit {
|
|
selectedQuality = input.required<ScreenShareQuality>();
|
|
includeSystemAudio = input(false);
|
|
|
|
confirmed = output<ScreenShareQuality>();
|
|
cancelled = output<undefined>();
|
|
|
|
readonly qualityOptions = SCREEN_SHARE_QUALITY_OPTIONS;
|
|
readonly activeQuality = signal<ScreenShareQuality>('balanced');
|
|
|
|
@HostListener('document:keydown.escape')
|
|
onEscape(): void {
|
|
this.cancelled.emit(undefined);
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
this.activeQuality.set(this.selectedQuality());
|
|
}
|
|
|
|
chooseQuality(quality: ScreenShareQuality): void {
|
|
this.activeQuality.set(quality);
|
|
}
|
|
|
|
confirm(): void {
|
|
this.confirmed.emit(this.activeQuality());
|
|
}
|
|
}
|