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.on("debugstate", this._onDebugStateChanged);
|
||||||
this.manager.client.on("event", this._onEvent);
|
this.manager.client.on("event", this._onEvent);
|
||||||
this.manager.on("entered", this._onEntered);
|
this.manager.on("entered", this._onEntered);
|
||||||
|
this.manager.on("left", this._onLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onEntered = () => {
|
_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) => {
|
_onEvent = (event) => {
|
||||||
if (!this.manager.entered) {
|
if (!this.manager.entered) {
|
||||||
this.bufferedEvents.push(event);
|
this.bufferedEvents.push(event);
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ export class ConferenceCallManager extends EventEmitter {
|
|||||||
clearTimeout(this._memberParticipantStateTimeout);
|
clearTimeout(this._memberParticipantStateTimeout);
|
||||||
|
|
||||||
this.emit("participants_changed");
|
this.emit("participants_changed");
|
||||||
|
this.emit("left");
|
||||||
}
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
|
|||||||
Reference in New Issue
Block a user