Skip to content

Commit

Permalink
openvidu-components: Disabled background button with video muted
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed May 10, 2022
1 parent a38d6b4 commit 185ea7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 185ea7a

Please sign in to comment.