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
path: root/docs
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-03-29 04:18:56 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-03-29 04:18:56 +0300
commitfeb84a26504ece2b6cd8ffb63f2bcbe395c6da9b (patch)
tree20d77fa91c1a560c493174f49d5212ea31e39fa7 /docs
parent5360418d2a331f0cf00bcf1cf6dc819758f6aa17 (diff)
documentation fixes
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md17
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/api.md b/docs/api.md
index 0956d89..2abf87d 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -201,10 +201,6 @@ Magnet URI of the torrent (string).
Array of all files in the torrent. See documentation for `File` below to learn what
methods/properties files have.
-## `torrent.swarm`
-
-The attached [bittorrent-swarm](https://github.com/feross/bittorrent-swarm) instance.
-
## `torrent.received`
Total bytes received from peers (*including* invalid data).
@@ -251,10 +247,9 @@ Alias for `client.remove(torrent)`.
## `torrent.addPeer(peer)`
-Adds a peer to the underlying
-[bittorrent-swarm](https://github.com/feross/bittorrent-swarm) instance. Normally, you
-don't need to call `torrent.addPeer()`. WebTorrent will automatically find peers using the
-tracker servers or DHT. This is just for manually adding a peer to the client.
+Adds a peer to the torrent swarm. Normally, you don't need to call `torrent.addPeer()`.
+WebTorrent will automatically find peers using the tracker servers or DHT. This is just
+for manually adding a peer to the client.
Returns `true` if peer was added, `false` if peer was blocked by the loaded blocklist.
@@ -264,7 +259,11 @@ instance (for WebRTC peers).
## `torrent.addWebSeed(url)`
-Adds a web seed to the [bittorrent-swarm](https://github.com/feross/bittorrent-swarm) instance.
+Adds a web seed to the torrent swarm. For more information on BitTorrent web seeds, see
+[BEP19](http://www.bittorrent.org/beps/bep_0019.html).
+
+In the browser, web seed servers must have proper CORS (Cross-origin resource sharing)
+headers so that data can be fetched across domain.
The `url` argument is the web seed URL.