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:
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index 1597707..1802d65 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -248,6 +248,8 @@ use the whole bandwidth of the connection.
Accepts an existing service worker registration [navigator.serviceWorker.controller] which must be activated, "creates" a file server for streamed file rendering to use.
+Needs either [this worker](https://github.com/webtorrent/webtorrent/blob/master/sw.min.js) to be used, or have [this functionality](https://github.com/webtorrent/webtorrent/blob/master/lib/worker.js) implemented.
+
# Torrent API
## `torrent.name`
@@ -797,12 +799,12 @@ Support table:
## `file.getStreamURL(elem, [function callback (err, elem) {}])` *(browser only)*
-Requires `client.loadWorker` to be ran beforehand. Sets the element source to the file's streaming URL.
+Requires `client.loadWorker` to be ran beforehand.
This method is useful for creating a file download link, like this:
```js
-file.getBlobURL((err, url) => {
+file.getStreamURL((err, url) => {
if (err) throw err
const a = document.createElement('a')
a.target = "_blank"