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-03-25 05:22:49 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-03-25 05:22:49 +0300
commit03ef03c6d5c527eef05086502bbe1e4856c6aecb (patch)
treeff9481acf218608a0d4c905fd30602c189b4dc30
parentfa74f4f74e749e8c1b8dfc560a563b2562ba6300 (diff)
merge quick-start.md into api.md
-rw-r--r--docs/api.md31
-rw-r--r--docs/quick-start.md28
2 files changed, 31 insertions, 28 deletions
diff --git a/docs/api.md b/docs/api.md
index 94cb519..b613d2d 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -1,3 +1,34 @@
+# WebTorrent Documentation
+
+WebTorrent is a streaming torrent client for **Node.js** and the **web**. WebTorrent
+provides the same API in both environments.
+
+To use WebTorrent in the browser, [WebRTC] support is required (Chrome, Firefox, Opera).
+
+[webrtc]: https://en.wikipedia.org/wiki/WebRTC
+
+## Install
+
+```bash
+npm install webtorrent
+```
+
+## Quick Example
+
+```js
+var client = new WebTorrent()
+
+var torrentId = 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d'
+
+client.add(torrentId, function (torrent) {
+ // Torrents can contain many files. Let's use the first.
+ var file = torrent.files[0]
+
+ // Display the file by adding it to the DOM. Supports video, audio, image, etc. files
+ file.appendTo('body')
+})
+```
+
# WebTorrent API
## `WebTorrent.WEBRTC_SUPPORT`
diff --git a/docs/quick-start.md b/docs/quick-start.md
deleted file mode 100644
index b0969e7..0000000
--- a/docs/quick-start.md
+++ /dev/null
@@ -1,28 +0,0 @@
-WebTorrent is a streaming torrent client for **Node.js** and the **web**. WebTorrent
-provides the same API in both environments.
-
-To use WebTorrent in the browser, [WebRTC] support is required (Chrome, Firefox, Opera).
-
-[webrtc]: https://en.wikipedia.org/wiki/WebRTC
-
-## Install
-
-```bash
-npm install webtorrent
-```
-
-## Quick Example
-
-```js
-var client = new WebTorrent()
-
-var torrentId = 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d'
-
-client.add(torrentId, function (torrent) {
- // Torrents can contain many files. Let's use the first.
- var file = torrent.files[0]
-
- // Display the file by adding it to the DOM. Supports video, audio, image, etc. files
- file.appendTo('body')
-})
-```