Reset debugger state after leaving the room.
This commit is contained in:
@@ -33,6 +33,7 @@ export class ConferenceCallDebugger extends EventEmitter {
|
||||
this.manager.on("debugstate", this._onDebugStateChanged);
|
||||
this.manager.client.on("event", this._onEvent);
|
||||
this.manager.on("entered", this._onEntered);
|
||||
this.manager.on("left", this._onLeft);
|
||||
}
|
||||
|
||||
_onEntered = () => {
|
||||
@@ -44,6 +45,15 @@ export class ConferenceCallDebugger extends EventEmitter {
|
||||
}
|
||||
};
|
||||
|
||||
_onLeft = () => {
|
||||
this.bufferedEvents = [];
|
||||
this.debugState = {
|
||||
users: new Map(),
|
||||
calls: new Map(),
|
||||
};
|
||||
this.emit("debug");
|
||||
};
|
||||
|
||||
_onEvent = (event) => {
|
||||
if (!this.manager.entered) {
|
||||
this.bufferedEvents.push(event);
|
||||
|
||||
@@ -288,6 +288,7 @@ export class ConferenceCallManager extends EventEmitter {
|
||||
clearTimeout(this._memberParticipantStateTimeout);
|
||||
|
||||
this.emit("participants_changed");
|
||||
this.emit("left");
|
||||
}
|
||||
|
||||
logout() {
|
||||
|
||||
Reference in New Issue
Block a user