openvidu-components: Hidden mute sound button for local participants

pull/803/head
Carlos Santos 2023-04-21 13:33:17 +02:00
parent f7b0f8e803
commit d7e7cfe6f7
2 changed files with 4 additions and 2 deletions

View File

@ -60,7 +60,7 @@
<span *ngIf="videoSizeIcon === videoSizeIconEnum.NORMAL">{{ 'STREAM.ZOOM_OUT' | translate }}</span> <span *ngIf="videoSizeIcon === videoSizeIconEnum.NORMAL">{{ 'STREAM.ZOOM_OUT' | translate }}</span>
<span *ngIf="videoSizeIcon === videoSizeIconEnum.BIG">{{ 'STREAM.ZOOM_IN' | translate }}</span> <span *ngIf="videoSizeIcon === videoSizeIconEnum.BIG">{{ 'STREAM.ZOOM_IN' | translate }}</span>
</button> </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> <mat-icon *ngIf="!_stream.participant.isMutedForcibly">volume_up</mat-icon>
<span *ngIf="!_stream.participant.isMutedForcibly">{{ 'STREAM.MUTE_SOUND' | translate }}</span> <span *ngIf="!_stream.participant.isMutedForcibly">{{ 'STREAM.MUTE_SOUND' | translate }}</span>

View File

@ -212,8 +212,10 @@ export class StreamComponent implements OnInit {
* @ignore * @ignore
*/ */
toggleMuteForcibly() { toggleMuteForcibly() {
if(this._stream.participant){
this.participantService.setRemoteMutedForcibly(this._stream.participant.id, !this._stream.participant.isMutedForcibly); this.participantService.setRemoteMutedForcibly(this._stream.participant.id, !this._stream.participant.isMutedForcibly);
} }
}
/** /**
* @ignore * @ignore