Fix participants and local media stream

This commit is contained in:
Robert Long 2021-08-09 11:03:31 -07:00
commit 27e78e0055
3 changed files with 7 additions and 4 deletions

View file

@ -15899,6 +15899,8 @@ class MatrixClient extends events_1.EventEmitter {
for (const track of this.localAVStream.getTracks()) { for (const track of this.localAVStream.getTracks()) {
track.stop(); track.stop();
} }
this.localAVStreamType = null;
this.localAVStream = null;
} }
} }
/** /**

File diff suppressed because one or more lines are too long

View file

@ -273,7 +273,7 @@ export class ConferenceCallManager extends EventEmitter {
this.client.stopLocalMediaStream(); this.client.stopLocalMediaStream();
this.entered = false; this.entered = false;
this.participants = [this.localParticipant]; this.participants = [];
this.localParticipant.stream = null; this.localParticipant.stream = null;
this.localParticipant.call = null; this.localParticipant.call = null;
clearTimeout(this._memberParticipantStateTimeout); clearTimeout(this._memberParticipantStateTimeout);
@ -324,6 +324,7 @@ export class ConferenceCallManager extends EventEmitter {
if ( if (
!participantInfo || !participantInfo ||
typeof participantInfo !== "object" ||
(participantInfo.expiresAt && participantInfo.expiresAt < now) (participantInfo.expiresAt && participantInfo.expiresAt < now)
) { ) {
this.emit("debugstate", participant.userId, null, "inactive"); this.emit("debugstate", participant.userId, null, "inactive");
@ -449,7 +450,7 @@ export class ConferenceCallManager extends EventEmitter {
); );
const participantInfo = memberStateEvent.getContent()[CONF_PARTICIPANT]; const participantInfo = memberStateEvent.getContent()[CONF_PARTICIPANT];
if (!participantInfo) { if (!participantInfo || typeof participantInfo !== "object") {
return; return;
} }