Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit f09d007

Browse files
authoredJun 18, 2020
chore: use ipfs utils for webrc support (#229)
1 parent 79059da commit f09d007

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,21 @@
6666
"class-is": "^1.1.0",
6767
"debug": "^4.1.1",
6868
"err-code": "^2.0.0",
69+
"ipfs-utils": "^2.3.0",
6970
"it-pipe": "^1.0.1",
7071
"libp2p-utils": "^0.1.0",
7172
"mafmt": "^7.0.1",
7273
"menoetius": "0.0.2",
7374
"minimist": "^1.2.0",
7475
"multiaddr": "^7.1.0",
7576
"p-defer": "^3.0.0",
76-
"peer-id": "~0.13.2",
77-
"peer-info": "~0.17.0",
77+
"peer-id": "~0.13.12",
7878
"prom-client": "^12.0.0",
7979
"simple-peer": "^9.6.0",
8080
"socket.io": "^2.3.0",
8181
"socket.io-client": "^2.3.0",
8282
"stream-to-it": "^0.2.0",
83-
"streaming-iterables": "^4.1.0",
84-
"webrtcsupport": "github:ipfs/webrtcsupport"
83+
"streaming-iterables": "^4.1.0"
8584
},
8685
"contributors": [
8786
"David Dias <daviddias.p@gmail.com>",

‎src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const withIs = require('class-is')
1010

1111
const { AbortError } = require('abortable-iterator')
1212
const SimplePeer = require('simple-peer')
13-
const webrtcSupport = require('webrtcsupport')
13+
const { supportsWebRTC: webrtcSupport } = require('ipfs-utils/src/supports')
1414

1515
const multiaddr = require('multiaddr')
1616
const mafmt = require('mafmt')
@@ -194,7 +194,7 @@ class WebRTCStar {
194194
* @returns {Listener} A WebrtcStar listener
195195
*/
196196
createListener (options = {}, handler) {
197-
if (!webrtcSupport.support && !this.wrtc) {
197+
if (!webrtcSupport && !this.wrtc) {
198198
throw errcode(new Error('no WebRTC support'), 'ERR_NO_WEBRTC_SUPPORT')
199199
}
200200

0 commit comments

Comments
 (0)
This repository has been archived.