Add clear array peer connection sharing
This commit is contained in:
parent
a88ad3cf4d
commit
e8f1b2d048
1 changed files with 8 additions and 0 deletions
|
@ -229,6 +229,14 @@ export class SimplePeer {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("closeConnection", err)
|
console.error("closeConnection", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if user left discussion, clear array peer connection of sharing
|
||||||
|
if(this.Users.length === 0) {
|
||||||
|
for (const userId of this.PeerScreenSharingConnectionArray.keys()) {
|
||||||
|
this.closeScreenSharingConnection(userId);
|
||||||
|
this.PeerScreenSharingConnectionArray.delete(userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue