1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

stopAllMedia() before deleteAllFeeds()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-04-24 12:56:28 +02:00
parent 1fe92f10c1
commit 973de2db55

View File

@@ -1466,12 +1466,13 @@ export class MatrixCall extends EventEmitter {
this.inviteTimeout = null;
}
// Order is important here: first we stopAllMedia() and only then we can deleteAllFeeds()
this.stopAllMedia();
this.deleteAllFeeds();
this.hangupParty = hangupParty;
this.hangupReason = hangupReason;
this.setState(CallState.Ended);
this.stopAllMedia();
if (this.peerConn && this.peerConn.signalingState !== 'closed') {
this.peerConn.close();
}