Add clear array peer connection sharing
This commit is contained in:
parent
a88ad3cf4d
commit
e8f1b2d048
@ -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…
Reference in New Issue
Block a user