Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Rodríguez Baquero <diegorbaquero@gmail.com>2016-10-03 21:33:10 +0300
committerGitHub <noreply@github.com>2016-10-03 21:33:10 +0300
commitb73c9791b57b09a98a7cc3faeee5ec6d8e8767bc (patch)
tree0be5b81864f112a01bc4029e5ad60761b1797002 /index.js
parentd10579a9f6b5639115615665e55bb23a7cb503fe (diff)
Initialize WRTC
Diffstat (limited to 'index.js')
-rw-r--r--index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.js b/index.js
index 667e16c..dfaed8d 100644
--- a/index.js
+++ b/index.js
@@ -101,9 +101,10 @@ function WebTorrent (opts) {
if (opts.wrtc) {
// TODO: remove in v1
console.warn('WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead')
- self.tracker.wrtc = opts.wrtc // to support `webtorrent-hybrid` package
+ self.tracker.wrtc = opts.wrtc
}
if (global.WRTC && !self.tracker.wrtc) self.tracker.wrtc = global.WRTC
+ if (typeof self.tracker.wrtc === 'function') self.tracker.wrtc = self.tracker.wrtc() // Initialize
}
if (typeof TCPPool === 'function') {