bittorrent-tracker/client should work if wrtc fails to install

This commit is contained in:
Feross Aboukhadijeh 2015-04-23 22:48:39 -07:00
parent 427e0f4305
commit 814b167e8a
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,8 @@ var Socket = require('simple-websocket')
var wrtc
try {
wrtc = require('wrtc') // WebRTC in node/browser
wrtc = require('wrtc') // WebRTC in node - empty object in browser
if (!wrtc.RTCPeerConnection) wrtc = null
} catch (err) {
wrtc = null // optional dependency failed to install
}

View File

@ -14,7 +14,8 @@
"./lib/common-node": false,
"./lib/http-tracker": false,
"./lib/udp-tracker": false,
"./server": false
"./server": false,
"wrtc": false
},
"bugs": {
"url": "https://github.com/feross/bittorrent-tracker/issues"