mirror of https://github.com/OpenVidu/openvidu.git
ov-components: add subscription for virtual background effects management
parent
388981be31
commit
1be876678c
|
@ -204,6 +204,7 @@ export class SessionComponent implements OnInit, OnDestroy {
|
||||||
// this.subscribeToParticipantNameChanged();
|
// this.subscribeToParticipantNameChanged();
|
||||||
this.subscribeToDataMessage();
|
this.subscribeToDataMessage();
|
||||||
this.subscribeToReconnection();
|
this.subscribeToReconnection();
|
||||||
|
this.subscribeToVirtualBackground();
|
||||||
|
|
||||||
if (this.libService.isRecordingEnabled()) {
|
if (this.libService.isRecordingEnabled()) {
|
||||||
// this.subscribeToRecordingEvents();
|
// this.subscribeToRecordingEvents();
|
||||||
|
@ -541,6 +542,17 @@ export class SessionComponent implements OnInit, OnDestroy {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private subscribeToVirtualBackground() {
|
||||||
|
this.libService.backgroundEffectsButton$.subscribe(async (enable) => {
|
||||||
|
if (!enable && this.backgroundService.isBackgroundApplied()) {
|
||||||
|
await this.backgroundService.removeBackground();
|
||||||
|
if (this.panelService.isBackgroundEffectsPanelOpened()) {
|
||||||
|
this.panelService.closePanel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private startUpdateLayoutInterval() {
|
private startUpdateLayoutInterval() {
|
||||||
this.updateLayoutInterval = setInterval(() => {
|
this.updateLayoutInterval = setInterval(() => {
|
||||||
this.layoutService.update();
|
this.layoutService.update();
|
||||||
|
|
Loading…
Reference in New Issue