mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Fixed bug muting remote participant
parent
09248b2b45
commit
e252b84740
|
@ -3,6 +3,7 @@ import { Subscription } from 'rxjs';
|
||||||
import { ParticipantPanelItemElementsDirective } from '../../../../directives/template/openvidu-angular.directive';
|
import { ParticipantPanelItemElementsDirective } from '../../../../directives/template/openvidu-angular.directive';
|
||||||
import { ParticipantAbstractModel } from '../../../../models/participant.model';
|
import { ParticipantAbstractModel } from '../../../../models/participant.model';
|
||||||
import { OpenViduAngularConfigService } from '../../../../services/config/openvidu-angular.config.service';
|
import { OpenViduAngularConfigService } from '../../../../services/config/openvidu-angular.config.service';
|
||||||
|
import { ParticipantService } from '../../../../services/participant/participant.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -95,7 +96,7 @@ export class ParticipantPanelItemComponent implements OnInit, OnDestroy {
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
constructor(private libService: OpenViduAngularConfigService, private cd: ChangeDetectorRef) {}
|
constructor(private libService: OpenViduAngularConfigService, protected participantService: ParticipantService, private cd: ChangeDetectorRef) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.subscribeToParticipantPanelItemDirectives();
|
this.subscribeToParticipantPanelItemDirectives();
|
||||||
|
@ -108,7 +109,7 @@ export class ParticipantPanelItemComponent implements OnInit, OnDestroy {
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
toggleMuteForcibly() {
|
toggleMuteForcibly() {
|
||||||
this._participant.setMutedForcibly(!this._participant.isMutedForcibly);
|
this.participantService.setRemoteMutedForcibly(this._participant.id, !this._participant.isMutedForcibly);
|
||||||
}
|
}
|
||||||
|
|
||||||
private subscribeToParticipantPanelItemDirectives() {
|
private subscribeToParticipantPanelItemDirectives() {
|
||||||
|
|
|
@ -205,7 +205,7 @@ export class StreamComponent implements OnInit {
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
toggleMuteForcibly() {
|
toggleMuteForcibly() {
|
||||||
this._stream.participant.setMutedForcibly(!this._stream.participant.isMutedForcibly);
|
this.participantService.setRemoteMutedForcibly(this._stream.participant.id, !this._stream.participant.isMutedForcibly);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -379,7 +379,15 @@ export class ParticipantService {
|
||||||
const participant = this.getRemoteParticipantByConnectionId(connectionId);
|
const participant = this.getRemoteParticipantByConnectionId(connectionId);
|
||||||
if (participant) {
|
if (participant) {
|
||||||
participant.setNickname(nickname);
|
participant.setNickname(nickname);
|
||||||
// this.updateRemoteParticipants();
|
this.updateRemoteParticipants();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setRemoteMutedForcibly(id: string, value: boolean) {
|
||||||
|
const participant = this.getRemoteParticipantById(id);
|
||||||
|
if (participant) {
|
||||||
|
participant.setMutedForcibly(value);
|
||||||
|
this.updateRemoteParticipants();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue