mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Refactored local participant updates
parent
b74ae7a6ab
commit
c6520133db
|
@ -371,6 +371,7 @@ export class OpenViduService {
|
|||
if (participantService.haveICameraAndScreenActive()) {
|
||||
// Disabling screenShare
|
||||
participantService.disableScreenStream();
|
||||
participantService.updateLocalParticipant();
|
||||
this.unpublishScreen(screenPublisher);
|
||||
} else if (participantService.isOnlyMyCameraActive()) {
|
||||
// I only have the camera published
|
||||
|
@ -407,6 +408,7 @@ export class OpenViduService {
|
|||
if (!participantService.isMyVideoActive()) {
|
||||
// Disabling webcam
|
||||
participantService.disableWebcamStream();
|
||||
participantService.updateLocalParticipant();
|
||||
this.unpublishCamera(cameraPublisher);
|
||||
}
|
||||
});
|
||||
|
@ -428,6 +430,7 @@ export class OpenViduService {
|
|||
|
||||
// Disabling screenshare
|
||||
participantService.disableScreenStream();
|
||||
participantService.updateLocalParticipant();
|
||||
this.unpublishScreen(screenPublisher);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ export class ParticipantService {
|
|||
this.disableWebcamStream();
|
||||
this.openviduService.unpublishCamera(cameraPublisher);
|
||||
this.publishAudioAux(screenPublisher, publishAudio);
|
||||
this.updateLocalParticipant();
|
||||
} else if (this.isOnlyMyScreenActive()) {
|
||||
// Enabling webcam
|
||||
const hasAudio = this.hasScreenAudioActive();
|
||||
|
@ -91,6 +92,7 @@ export class ParticipantService {
|
|||
this.publishAudioAux(screenPublisher, false);
|
||||
this.publishAudioAux(cameraPublisher, hasAudio);
|
||||
this.enableWebcamStream();
|
||||
this.updateLocalParticipant();
|
||||
} else {
|
||||
// Muting/unmuting webcam
|
||||
await this.publishVideoAux(cameraPublisher, publish);
|
||||
|
@ -161,7 +163,6 @@ export class ParticipantService {
|
|||
*/
|
||||
enableWebcamStream() {
|
||||
this.localParticipant.enableCamera();
|
||||
this.updateLocalParticipant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -169,7 +170,6 @@ export class ParticipantService {
|
|||
*/
|
||||
disableWebcamStream() {
|
||||
this.localParticipant.disableCamera();
|
||||
this.updateLocalParticipant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -197,7 +197,6 @@ export class ParticipantService {
|
|||
*/
|
||||
disableScreenStream() {
|
||||
this.localParticipant.disableScreen();
|
||||
this.updateLocalParticipant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -249,7 +248,7 @@ export class ParticipantService {
|
|||
this.disableScreenStream();
|
||||
this.remoteParticipants = [];
|
||||
this.updateRemoteParticipants();
|
||||
// this.updateLocalParticipant();
|
||||
this.updateLocalParticipant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -331,7 +330,6 @@ export class ParticipantService {
|
|||
}
|
||||
|
||||
await publisher.publishVideo(publish, resource);
|
||||
this.updateLocalParticipant();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue