openvidu-testapp: add RoomEvent.ParticipantActive

master
pabloFuente 2025-07-02 18:14:45 +02:00
parent 703698b25f
commit 5d91f4d343
2 changed files with 24 additions and 3 deletions

View File

@ -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 ( if (
firstTime || firstTime ||
this.roomEvents.get(RoomEvent.ParticipantDisconnected) !== this.roomEvents.get(RoomEvent.ParticipantDisconnected) !==
@ -1086,7 +1106,8 @@ export class OpenviduInstanceComponent {
const dialogRef = this.dialog.open(OptionsDialogComponent, { const dialogRef = this.dialog.open(OptionsDialogComponent, {
data: { data: {
roomOptions: this.roomOptions, roomOptions: this.roomOptions,
forceRelay: this.roomConnectOptions.rtcConfig!.iceTransportPolicy === 'relay', forceRelay:
this.roomConnectOptions.rtcConfig!.iceTransportPolicy === 'relay',
createLocalTracksOptions: this.createLocalTracksOptions, createLocalTracksOptions: this.createLocalTracksOptions,
shareScreen: true, shareScreen: true,
screenShareCaptureOptions: this.screenShareCaptureOptions, screenShareCaptureOptions: this.screenShareCaptureOptions,

View File

@ -215,8 +215,8 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
this.updateEventList(RoomEvent.ParticipantConnected); this.updateEventList(RoomEvent.ParticipantConnected);
}); });
room.on(RoomEvent.ParticipantConnected, () => { room.on(RoomEvent.ParticipantActive, () => {
this.updateEventList(RoomEvent.ParticipantConnected); this.updateEventList(RoomEvent.ParticipantActive);
}); });
room.on( room.on(