From d3a1b1704d7876e67957521db5fe40f1cff1a2de Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Mon, 11 Nov 2024 11:47:13 +0100 Subject: [PATCH] Update NDC to 0.21.0 now that TS types are included --- package.json | 2 +- src/webrtc/rtc-connection.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 95c31db..08d1dff 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "import-sync": "^2.2.0", "lodash": "^4.17.21", "mockttp": "^3.2.1", - "node-datachannel": "^0.12.0", + "node-datachannel": "^0.21.0", "performance-now": "^2.1.0", "sdp-transform": "^2.14.1" }, diff --git a/src/webrtc/rtc-connection.ts b/src/webrtc/rtc-connection.ts index 2f2479e..670260b 100644 --- a/src/webrtc/rtc-connection.ts +++ b/src/webrtc/rtc-connection.ts @@ -351,7 +351,7 @@ export class RTCConnection extends EventEmitter { const offerSDP = SDP.parse(localDesc.sdp); mirrorMediaParams(offerToMirror, offerSDP); - localDesc.sdp = SDP.write(offerSDP); + localDesc.sdp = SDP.write(offerSDP) as any; this.localDescription = { ...localDesc as MockRTCSessionDescription, @@ -367,7 +367,7 @@ export class RTCConnection extends EventEmitter { const answerSDP = SDP.parse(localDesc.sdp!); mirrorMediaParams(answerToMirror, answerSDP); - localDesc.sdp = SDP.write(answerSDP); + localDesc.sdp = SDP.write(answerSDP) as any; this.localDescription = { ...localDesc as MockRTCSessionDescription, @@ -460,7 +460,7 @@ function sdpDirectionToNDCDirection(direction: SDP.SharedAttributes['direction'] return direction[0].toUpperCase() + direction.slice(1, 4) + direction[4].toUpperCase() + - direction.slice(5) as NodeDataChannel.Direction; + direction.slice(5) as NDCDirection; } else { return NodeDataChannel.Direction.Unknown; }