Allow {wrtc: false} to disable WebRTC support

This commit is contained in:
Feross Aboukhadijeh 2016-05-13 16:47:09 -07:00
parent 808a9201cb
commit 0d9ee4c93a

View File

@ -64,7 +64,7 @@ function Client (opts) {
debug('new client %s', self.infoHash)
var webrtcSupport = !!self._wrtc || typeof window !== 'undefined'
var webrtcSupport = self._wrtc !== false && (!!self._wrtc || typeof window !== 'undefined')
var announce = (typeof opts.announce === 'string')
? [ opts.announce ]