From 0130530ca338b8329983fd2ac766a0a7b556c94f Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 2 Jan 2016 14:26:14 +0100 Subject: New API: WebTorrent.WEBRTC_SUPPORT Detect native WebRTC support in the environment. ```js if (WebTorrent.WEBRTC_SUPPORT) { // webrtc support! } else { // fallback } ``` --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'README.md') 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. -- cgit v1.2.3