From 3ddc4317baf8985782398ab5f5c893ae3ec5dcea Mon Sep 17 00:00:00 2001 From: vinz243 Date: Mon, 28 Dec 2015 12:18:28 +0100 Subject: [PATCH 1/2] Add docs to several unlisted functions + made lack of UDP/TCP support more obvious. --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55cb551e..812216d6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ other torrent clients. In the browser, WebTorrent uses **WebRTC** (data channels) for peer-to-peer transport. It can be used **without** browser plugins, extensions, or installations. It's Just -JavaScript™. +JavaScript™. Note: WebTorrent does **not** support UDP/TCP peers in browser. Simply include the [`webtorrent.min.js`](https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js) script @@ -316,7 +316,6 @@ through the `client.torrents` array. Returns `null` if no matching torrent found Seed ratio for all torrents in the client. - ### torrent api #### `torrent.infoHash` @@ -344,6 +343,27 @@ Get total bytes received from peers (including invalid data) Get total bytes received from peers (excluding invalid data) +#### `torrent.timeRemaining` + +Get the time remaining in millis if downloading + +### `torrent.progress` + +Get the total progress from 0 to 1. + +### `torrent.ratio` + +Get the torrent ratio (seeded/downloaded) + +### `torrent.downloadSpeed()` + +Returns the download speed + +### `torrent.uploadSpeed()` + +Returns the current upload speed. + + #### `torrent.path` Get the torrent download location From 2bb16d95b988e1dfe85cd2c62e69608bb202dd08 Mon Sep 17 00:00:00 2001 From: vinz243 Date: Mon, 28 Dec 2015 12:21:06 +0100 Subject: [PATCH 2/2] Add missing hash tags for titles --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 812216d6..2d06ce3d 100644 --- a/README.md +++ b/README.md @@ -347,19 +347,19 @@ Get total bytes received from peers (excluding invalid data) Get the time remaining in millis if downloading -### `torrent.progress` +#### `torrent.progress` Get the total progress from 0 to 1. -### `torrent.ratio` +#### `torrent.ratio` Get the torrent ratio (seeded/downloaded) -### `torrent.downloadSpeed()` +#### `torrent.downloadSpeed()` Returns the download speed -### `torrent.uploadSpeed()` +#### `torrent.uploadSpeed()` Returns the current upload speed.