mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Disabled background button with video muted
parent
a38d6b4855
commit
185ea7a1fd
|
@ -13,7 +13,8 @@
|
|||
<ov-layout>
|
||||
<ng-template #stream let-stream>
|
||||
<button
|
||||
*ngIf="!isMinimal && !isVideoMuted && showBackgroundEffectsButton"
|
||||
*ngIf="!isMinimal && showBackgroundEffectsButton"
|
||||
[disabled]="isVideoMuted"
|
||||
mat-icon-button
|
||||
id="background-effects-btn"
|
||||
(click)="toggleBackgroundEffects()"
|
||||
|
|
|
@ -93,7 +93,13 @@
|
|||
</button> -->
|
||||
|
||||
<!-- Virtual background button -->
|
||||
<button *ngIf="!isMinimal && showBackgroundEffectsButton" mat-menu-item id="virtual-bg-btn" (click)="toggleBackgroundEffects()">
|
||||
<button
|
||||
*ngIf="!isMinimal && showBackgroundEffectsButton"
|
||||
[disabled]="!isWebcamVideoActive"
|
||||
mat-menu-item
|
||||
id="virtual-bg-btn"
|
||||
(click)="toggleBackgroundEffects()"
|
||||
>
|
||||
<mat-icon>auto_awesome</mat-icon>
|
||||
<span>Background effects</span>
|
||||
</button>
|
||||
|
|
|
@ -403,6 +403,9 @@ export class ToolbarComponent implements OnInit, OnDestroy {
|
|||
this.onCameraButtonClicked.emit();
|
||||
try {
|
||||
const publishVideo = !this.participantService.isMyVideoActive();
|
||||
if(this.panelService.isExternalPanelOpened() && !publishVideo) {
|
||||
this.panelService.togglePanel(PanelType.BACKGROUND_EFFECTS);
|
||||
}
|
||||
await this.openviduService.publishVideo(publishVideo);
|
||||
} catch (error) {
|
||||
this.log.e('There was an error toggling camera:', error.code, error.message);
|
||||
|
|
Loading…
Reference in New Issue