1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-07 23:02:56 +03:00

Add more MatrixCall tests (#2697)

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2022-09-26 12:02:41 +02:00
committed by GitHub
parent af6f9d49f4
commit ab39ee37d6
2 changed files with 125 additions and 2 deletions

View File

@@ -103,6 +103,7 @@ export class MockRTCPeerConnection {
private negotiationNeededListener: () => void;
public iceCandidateListener?: (e: RTCPeerConnectionIceEvent) => void;
public onTrackListener?: (e: RTCTrackEvent) => void;
private needsNegotiation = false;
public readyToNegotiate: Promise<void>;
private onReadyToNegotiate: () => void;
@@ -143,6 +144,8 @@ export class MockRTCPeerConnection {
this.negotiationNeededListener = listener;
} else if (type == 'icecandidate') {
this.iceCandidateListener = listener;
} else if (type == 'track') {
this.onTrackListener = listener;
}
}
createDataChannel(label: string, opts: RTCDataChannelInit) { return { label, ...opts }; }