Skip to content

Commit

Permalink
openvidu-components: Hidden mute sound button for local participants
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Apr 21, 2023
1 parent f7b0f8e commit d7e7cfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<span *ngIf="videoSizeIcon === videoSizeIconEnum.NORMAL">{{ 'STREAM.ZOOM_OUT' | translate }}</span>
<span *ngIf="videoSizeIcon === videoSizeIconEnum.BIG">{{ 'STREAM.ZOOM_IN' | translate }}</span>
</button>
<button mat-menu-item id="sound-btn" *ngIf="!this._stream.local" (click)="toggleMuteForcibly()">
<button mat-menu-item id="sound-btn" *ngIf="!this._stream.participant.local" (click)="toggleMuteForcibly()">
<mat-icon *ngIf="!_stream.participant.isMutedForcibly">volume_up</mat-icon>
<span *ngIf="!_stream.participant.isMutedForcibly">{{ 'STREAM.MUTE_SOUND' | translate }}</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ export class StreamComponent implements OnInit {
* @ignore
*/
toggleMuteForcibly() {
this.participantService.setRemoteMutedForcibly(this._stream.participant.id, !this._stream.participant.isMutedForcibly);
if(this._stream.participant){
this.participantService.setRemoteMutedForcibly(this._stream.participant.id, !this._stream.participant.isMutedForcibly);
}
}

/**
Expand Down

0 comments on commit d7e7cfe

Please sign in to comment.