Skip to content

Commit ad6f70b

Browse files
authored
fix: use node-datachannel WebRTC polyfill (#2306)
node-datachannel has shipped a WebRTC polyfill for the last few versions so use that instead of our own version. Refs: murat-dogan/node-datachannel#185
1 parent 230afea commit ad6f70b

File tree

7 files changed

+2
-541
lines changed

7 files changed

+2
-541
lines changed

packages/transport-webrtc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"it-to-buffer": "^4.0.2",
6868
"multiformats": "^12.1.3",
6969
"multihashes": "^4.0.3",
70-
"node-datachannel": "^0.5.0-dev",
70+
"node-datachannel": "^0.5.3",
7171
"p-defer": "^4.0.0",
7272
"p-event": "^6.0.0",
7373
"p-timeout": "^6.1.2",

packages/transport-webrtc/src/webrtc/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import node from 'node-datachannel'
2-
import { IceCandidate } from './rtc-ice-candidate.js'
3-
import { PeerConnection } from './rtc-peer-connection.js'
4-
import { SessionDescription } from './rtc-session-description.js'
52

6-
export { SessionDescription as RTCSessionDescription }
7-
export { IceCandidate as RTCIceCandidate }
8-
export { PeerConnection as RTCPeerConnection }
3+
export { RTCSessionDescription, RTCIceCandidate, RTCPeerConnection } from 'node-datachannel/polyfill'
94

105
export function cleanup (): void {
116
node.cleanup()

packages/transport-webrtc/src/webrtc/rtc-data-channel.ts

Lines changed: 0 additions & 140 deletions
This file was deleted.

packages/transport-webrtc/src/webrtc/rtc-events.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/transport-webrtc/src/webrtc/rtc-ice-candidate.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)