mirror of https://github.com/OpenVidu/openvidu.git
ov-components: add event handling for participant left and update config state
parent
549a822491
commit
dfae82d4cf
|
@ -620,6 +620,8 @@ describe('Testing videoconference EVENTS', () => {
|
|||
expect(await utils.isPresent('#leave-btn')).toBeTrue();
|
||||
await leaveButton.click();
|
||||
|
||||
await utils.waitForElement('#events');
|
||||
|
||||
// Checking if onParticipantLeft has been received
|
||||
await utils.waitForElement('#onParticipantLeft');
|
||||
expect(await utils.isPresent('#onParticipantLeft')).toBeTrue();
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<div id="events"></div>
|
||||
|
||||
@if (configReady) {
|
||||
<ov-videoconference
|
||||
[token]="token"
|
||||
|
@ -30,7 +32,6 @@
|
|||
[activitiesPanelRecordingActivity]="activitiesPanelRecordingActivity"
|
||||
[activitiesPanelBroadcastingActivity]="activitiesPanelBroadcastingActivity"
|
||||
[toolbarSettingsButton]="toolbarSettingsButton"
|
||||
|
||||
(onTokenRequested)="onTokenRequested($event)"
|
||||
(onReadyToJoin)="onReadyToJoin()"
|
||||
(onRoomCreated)="onRoomCreated($event)"
|
||||
|
@ -55,8 +56,4 @@
|
|||
(onActivitiesPanelStatusChanged)="onActivitiesPanelStatusChanged($event)"
|
||||
>
|
||||
</ov-videoconference>
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div id="events"></div>
|
|
@ -175,6 +175,8 @@ export class CallComponent implements OnInit {
|
|||
}
|
||||
|
||||
async onParticipantLeft(event: ParticipantLeftEvent) {
|
||||
this.configReady = false;
|
||||
this.isSessionAlive = false;
|
||||
this.appendElement('onParticipantLeft');
|
||||
console.warn('VC PARTICIPANT LEFT', event);
|
||||
if (this.redirectToHomeOnLeaves) await this.router.navigate(['/']);
|
||||
|
|
Loading…
Reference in New Issue