You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Test that calls in a group call are retried (#2637)
* Test that calls in a group call are retried * Add new flushpromises file
This commit is contained in:
@@ -79,6 +79,8 @@ export class MockRTCPeerConnection {
|
||||
|
||||
private negotiationNeededListener: () => void;
|
||||
private needsNegotiation = false;
|
||||
public readyToNegotiate: Promise<void>;
|
||||
private onReadyToNegotiate: () => void;
|
||||
localDescription: RTCSessionDescription;
|
||||
signalingState: RTCSignalingState = "stable";
|
||||
|
||||
@@ -99,6 +101,10 @@ export class MockRTCPeerConnection {
|
||||
toJSON: function() { },
|
||||
};
|
||||
|
||||
this.readyToNegotiate = new Promise<void>(resolve => {
|
||||
this.onReadyToNegotiate = resolve;
|
||||
});
|
||||
|
||||
MockRTCPeerConnection.instances.push(this);
|
||||
}
|
||||
|
||||
@@ -128,11 +134,13 @@ export class MockRTCPeerConnection {
|
||||
getStats() { return []; }
|
||||
addTrack(track: MockMediaStreamTrack) {
|
||||
this.needsNegotiation = true;
|
||||
this.onReadyToNegotiate();
|
||||
return new MockRTCRtpSender(track);
|
||||
}
|
||||
|
||||
removeTrack() {
|
||||
this.needsNegotiation = true;
|
||||
this.onReadyToNegotiate();
|
||||
}
|
||||
|
||||
doNegotiation() {
|
||||
|
Reference in New Issue
Block a user