Skip to content

Commit

Permalink
fix: use node-datachannel WebRTC polyfill (#2306)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
achingbrain authored Dec 18, 2023
1 parent 230afea commit ad6f70b
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 541 deletions.
2 changes: 1 addition & 1 deletion packages/transport-webrtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"it-to-buffer": "^4.0.2",
"multiformats": "^12.1.3",
"multihashes": "^4.0.3",
"node-datachannel": "^0.5.0-dev",
"node-datachannel": "^0.5.3",
"p-defer": "^4.0.0",
"p-event": "^6.0.0",
"p-timeout": "^6.1.2",
Expand Down
7 changes: 1 addition & 6 deletions packages/transport-webrtc/src/webrtc/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import node from 'node-datachannel'
import { IceCandidate } from './rtc-ice-candidate.js'
import { PeerConnection } from './rtc-peer-connection.js'
import { SessionDescription } from './rtc-session-description.js'

export { SessionDescription as RTCSessionDescription }
export { IceCandidate as RTCIceCandidate }
export { PeerConnection as RTCPeerConnection }
export { RTCSessionDescription, RTCIceCandidate, RTCPeerConnection } from 'node-datachannel/polyfill'

export function cleanup (): void {
node.cleanup()
Expand Down
140 changes: 0 additions & 140 deletions packages/transport-webrtc/src/webrtc/rtc-data-channel.ts

This file was deleted.

19 changes: 0 additions & 19 deletions packages/transport-webrtc/src/webrtc/rtc-events.ts

This file was deleted.

50 changes: 0 additions & 50 deletions packages/transport-webrtc/src/webrtc/rtc-ice-candidate.ts

This file was deleted.

Loading

0 comments on commit ad6f70b

Please sign in to comment.