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:
authorFeross Aboukhadijeh <feross@feross.org>2016-01-02 16:26:14 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-01-02 16:26:14 +0300
commit0130530ca338b8329983fd2ac766a0a7b556c94f (patch)
tree3f141ce69a8a430bdc968ed5012bf0bf5243a22f /README.md
parente36e0d50909e698e31633a584bf1792b3bc523cf (diff)
New API: WebTorrent.WEBRTC_SUPPORT
Detect native WebRTC support in the environment. ```js if (WebTorrent.WEBRTC_SUPPORT) { // webrtc support! } else { // fallback } ```
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1a6a09a..ebae51d 100644
--- a/README.md
+++ b/README.md
@@ -220,6 +220,18 @@ In addition to magnet uris, webtorrent supports [many ways to specify a torrent]
This API should work exactly the same in node and the browser. Open an issue if this is
not the case.
+#### `WebTorrent.WEBRTC_SUPPORT`
+
+Detect native WebRTC support in the environment.
+
+```js
+if (WebTorrent.WEBRTC_SUPPORT) {
+ // webrtc support!
+} else {
+ // fallback
+}
+```
+
#### `client = new WebTorrent([opts])`
Create a new `WebTorrent` instance.