You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Add tests for call answering / candidate sending (#2666)
* Add tests for call answering / candidate sending * Remopve unused stuff * Capitalise Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com> * Capitalisation * Capitalise * Fix typescript strict error * Actually fix TS strict error(?) * TS strict mode try 3 Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -99,6 +99,7 @@ export class MockRTCPeerConnection {
|
||||
private static instances: MockRTCPeerConnection[] = [];
|
||||
|
||||
private negotiationNeededListener: () => void;
|
||||
public iceCandidateListener?: (e: RTCPeerConnectionIceEvent) => void;
|
||||
private needsNegotiation = false;
|
||||
public readyToNegotiate: Promise<void>;
|
||||
private onReadyToNegotiate: () => void;
|
||||
@@ -135,7 +136,11 @@ export class MockRTCPeerConnection {
|
||||
}
|
||||
|
||||
addEventListener(type: string, listener: () => void) {
|
||||
if (type === 'negotiationneeded') this.negotiationNeededListener = listener;
|
||||
if (type === 'negotiationneeded') {
|
||||
this.negotiationNeededListener = listener;
|
||||
} else if (type == 'icecandidate') {
|
||||
this.iceCandidateListener = listener;
|
||||
}
|
||||
}
|
||||
createDataChannel(label: string, opts: RTCDataChannelInit) { return { label, ...opts }; }
|
||||
createOffer() {
|
||||
|
Reference in New Issue
Block a user