mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: better end scenario logic
parent
888f0bdb7e
commit
5bacf37523
|
@ -103,9 +103,12 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
this.scenarioPlaying = true;
|
this.scenarioPlaying = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
endScenario() {
|
async endScenario() {
|
||||||
for (const user of this.users) {
|
await Promise.all(this.users.map((user) => user.room.disconnect()));
|
||||||
user.room.disconnect();
|
try {
|
||||||
|
await this.roomApiService.deleteRoom(this.fixedRoomId);
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error(JSON.stringify(error));
|
||||||
}
|
}
|
||||||
this.users = [];
|
this.users = [];
|
||||||
this.scenarioPlaying = false;
|
this.scenarioPlaying = false;
|
||||||
|
|
Loading…
Reference in New Issue