Skip to content

Commit

Permalink
Update NDC to 0.21.0 now that TS types are included
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Nov 11, 2024
1 parent 574a5bc commit d3a1b17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 3 additions & 3 deletions src/webrtc/rtc-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d3a1b17

Please sign in to comment.