Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge the webtorrent-www API docs (for #507) #682

Merged
merged 5 commits into from Mar 16, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

add quick-start docs

  • Loading branch information
feross committed Mar 16, 2016
commit a5f4096741818767d8801bb787530855db3f2622
@@ -0,0 +1,21 @@
## 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')
})
```
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.