diff --git a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts index 1ee9ca25..fba827ba 100644 --- a/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts +++ b/openvidu-testapp/src/app/components/openvidu-instance/openvidu-instance.component.ts @@ -328,6 +328,26 @@ export class OpenviduInstanceComponent { } } + if ( + firstTime || + this.roomEvents.get(RoomEvent.ParticipantActive) !== + oldValues.get(RoomEvent.ParticipantActive) + ) { + this.room?.removeAllListeners(RoomEvent.ParticipantActive); + if (this.roomEvents.get(RoomEvent.ParticipantActive)) { + this.room!.on( + RoomEvent.ParticipantActive, + (participant: Participant) => { + this.updateEventList( + RoomEvent.ParticipantActive, + { participant }, + participant.identity + ); + } + ); + } + } + if ( firstTime || this.roomEvents.get(RoomEvent.ParticipantDisconnected) !== @@ -1086,7 +1106,8 @@ export class OpenviduInstanceComponent { const dialogRef = this.dialog.open(OptionsDialogComponent, { data: { roomOptions: this.roomOptions, - forceRelay: this.roomConnectOptions.rtcConfig!.iceTransportPolicy === 'relay', + forceRelay: + this.roomConnectOptions.rtcConfig!.iceTransportPolicy === 'relay', createLocalTracksOptions: this.createLocalTracksOptions, shareScreen: true, screenShareCaptureOptions: this.screenShareCaptureOptions, diff --git a/openvidu-testapp/src/app/components/test-scenarios/test-scenarios.component.ts b/openvidu-testapp/src/app/components/test-scenarios/test-scenarios.component.ts index 3f9dcda3..52e7276c 100644 --- a/openvidu-testapp/src/app/components/test-scenarios/test-scenarios.component.ts +++ b/openvidu-testapp/src/app/components/test-scenarios/test-scenarios.component.ts @@ -215,8 +215,8 @@ export class TestScenariosComponent implements OnInit, OnDestroy { this.updateEventList(RoomEvent.ParticipantConnected); }); - room.on(RoomEvent.ParticipantConnected, () => { - this.updateEventList(RoomEvent.ParticipantConnected); + room.on(RoomEvent.ParticipantActive, () => { + this.updateEventList(RoomEvent.ParticipantActive); }); room.on(