diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-01-02 16:26:14 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2016-01-02 16:26:14 +0300 |
commit | 0130530ca338b8329983fd2ac766a0a7b556c94f (patch) | |
tree | 3f141ce69a8a430bdc968ed5012bf0bf5243a22f /README.md | |
parent | e36e0d50909e698e31633a584bf1792b3bc523cf (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.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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. |