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();
|
expect(await utils.isPresent('#leave-btn')).toBeTrue();
|
||||||
await leaveButton.click();
|
await leaveButton.click();
|
||||||
|
|
||||||
|
await utils.waitForElement('#events');
|
||||||
|
|
||||||
// Checking if onParticipantLeft has been received
|
// Checking if onParticipantLeft has been received
|
||||||
await utils.waitForElement('#onParticipantLeft');
|
await utils.waitForElement('#onParticipantLeft');
|
||||||
expect(await utils.isPresent('#onParticipantLeft')).toBeTrue();
|
expect(await utils.isPresent('#onParticipantLeft')).toBeTrue();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<div id="events"></div>
|
||||||
|
|
||||||
@if (configReady) {
|
@if (configReady) {
|
||||||
<ov-videoconference
|
<ov-videoconference
|
||||||
[token]="token"
|
[token]="token"
|
||||||
|
@ -30,7 +32,6 @@
|
||||||
[activitiesPanelRecordingActivity]="activitiesPanelRecordingActivity"
|
[activitiesPanelRecordingActivity]="activitiesPanelRecordingActivity"
|
||||||
[activitiesPanelBroadcastingActivity]="activitiesPanelBroadcastingActivity"
|
[activitiesPanelBroadcastingActivity]="activitiesPanelBroadcastingActivity"
|
||||||
[toolbarSettingsButton]="toolbarSettingsButton"
|
[toolbarSettingsButton]="toolbarSettingsButton"
|
||||||
|
|
||||||
(onTokenRequested)="onTokenRequested($event)"
|
(onTokenRequested)="onTokenRequested($event)"
|
||||||
(onReadyToJoin)="onReadyToJoin()"
|
(onReadyToJoin)="onReadyToJoin()"
|
||||||
(onRoomCreated)="onRoomCreated($event)"
|
(onRoomCreated)="onRoomCreated($event)"
|
||||||
|
@ -55,8 +56,4 @@
|
||||||
(onActivitiesPanelStatusChanged)="onActivitiesPanelStatusChanged($event)"
|
(onActivitiesPanelStatusChanged)="onActivitiesPanelStatusChanged($event)"
|
||||||
>
|
>
|
||||||
</ov-videoconference>
|
</ov-videoconference>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<div id="events"></div>
|
|
|
@ -175,6 +175,8 @@ export class CallComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
async onParticipantLeft(event: ParticipantLeftEvent) {
|
async onParticipantLeft(event: ParticipantLeftEvent) {
|
||||||
|
this.configReady = false;
|
||||||
|
this.isSessionAlive = false;
|
||||||
this.appendElement('onParticipantLeft');
|
this.appendElement('onParticipantLeft');
|
||||||
console.warn('VC PARTICIPANT LEFT', event);
|
console.warn('VC PARTICIPANT LEFT', event);
|
||||||
if (this.redirectToHomeOnLeaves) await this.router.navigate(['/']);
|
if (this.redirectToHomeOnLeaves) await this.router.navigate(['/']);
|
||||||
|
|
Loading…
Reference in New Issue