Skip to content

Commit

Permalink
feross -> webtorrent
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Apr 14, 2017
1 parent eb6c827 commit b4e79a3
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- DO NOT POST LINKS OR REFERENCES TO COPYRIGHTED CONTENT IN YOUR ISSUE. -->

<!-- Issue with the desktop app? Post here: https://github.com/feross/webtorrent-desktop/issues -->
<!-- Issue with the desktop app? Post here: https://github.com/webtorrent/webtorrent-desktop/issues -->

**What version of WebTorrent?**

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and to avoid style arguments. `npm test` runs `standard` automatically, so you d
to!

[standard-image]: https://cdn.rawgit.com/feross/standard/master/badge.svg
[standard-url]: https://github.com/feross/standard
[standard-url]: https://standardjs.com

## Project Governance

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) WebTorrent, LLC
Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
86 changes: 42 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<h4 align="center">The streaming torrent client. For node.js and the web.</h4>

<p align="center">
<a href="https://gitter.im/feross/webtorrent"><img src="https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg" alt="gitter"></a>
<a href="https://travis-ci.org/feross/webtorrent"><img src="https://img.shields.io/travis/feross/webtorrent/master.svg" alt="travis"></a>
<a href="https://ci.appveyor.com/project/feross/webtorrent"><img src="https://ci.appveyor.com/api/projects/status/cgu85xlgl72uoswq/branch/master?svg=true" alt="appveyor"></a>
<a href="https://gitter.im/webtorrent/webtorrent"><img src="https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg" alt="gitter"></a>
<a href="https://travis-ci.org/webtorrent/webtorrent"><img src="https://img.shields.io/travis/webtorrent/webtorrent/master.svg" alt="travis"></a>
<a href="https://ci.appveyor.com/project/webtorrent/webtorrent"><img src="https://ci.appveyor.com/api/projects/status/cgu85xlgl72uoswq/branch/master?svg=true" alt="appveyor"></a>
<a href="https://www.npmjs.com/package/webtorrent"><img src="https://img.shields.io/npm/v/webtorrent.svg" alt="npm version"></a>
<a href="https://www.npmjs.com/package/webtorrent"><img src="https://img.shields.io/npm/dm/webtorrent.svg" alt="npm downloads"></a>
<a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide"></a>
Expand Down Expand Up @@ -43,7 +43,7 @@ peer"** can only connect to other clients that support WebTorrent/WebRTC.
To seed files to web peers, use a client that supports WebTorrent, e.g.
[WebTorrent Desktop][webtorrent-desktop], a desktop client with a
familiar UI that can connect to web peers,
[webtorrent-hybrid](https://github.com/feross/webtorrent-hybrid), a command line program,
[webtorrent-hybrid](https://github.com/webtorrent/webtorrent-hybrid), a command line program,
or [Instant.io](https://instant.io/), a website. Established torrent clients like
**Vuze** have [already added WebTorrent support](https://wiki.vuze.com/w/WebTorrent) so
they can connect to both normal *and* web peers. We hope other clients will follow.
Expand All @@ -60,11 +60,11 @@ they can connect to both normal *and* web peers. We hope other clients will foll
- Fetches pieces from the network on-demand so seeking is supported (even before torrent is finished)
- Seamlessly switches between sequential and rarest-first piece selection strategy
- Supports advanced torrent client features
- **magnet uri** support via **[ut_metadata](https://github.com/feross/ut_metadata)**
- **peer discovery** via **[dht](https://github.com/feross/bittorrent-dht)**,
**[tracker](https://github.com/feross/bittorrent-tracker)**, and
- **magnet uri** support via **[ut_metadata](https://github.com/webtorrent/ut_metadata)**
- **peer discovery** via **[dht](https://github.com/webtorrent/bittorrent-dht)**,
**[tracker](https://github.com/webtorrent/bittorrent-tracker)**, and
**[ut_pex](https://github.com/fisch0920/ut_pex)**
- **[protocol extension api](https://github.com/feross/bittorrent-protocol#extension-api)**
- **[protocol extension api](https://github.com/webtorrent/bittorrent-protocol#extension-api)**
for adding new extensions
- **Comprehensive test suite** (runs completely offline, so it's reliable and fast)

Expand All @@ -91,7 +91,7 @@ npm install webtorrent
```

To install a `webtorrent`
[command line program](https://github.com/feross/webtorrent-cli), run:
[command line program](https://github.com/webtorrent/webtorrent-cli), run:

```bash
npm install webtorrent-cli -g
Expand All @@ -104,8 +104,8 @@ To install a WebTorrent desktop appliation for Mac, Windows, or Linux, see

- **Join us in [Gitter][webtorrent-gitter-url]** or on freenode at `#webtorrent` to help
with development or to hang out with some mad science hackers :)
- **[Create a new issue](https://github.com/feross/webtorrent/issues/new)** to report bugs
- **[Fix an issue](https://github.com/feross/webtorrent/issues?state=open)**. WebTorrent
- **[Create a new issue](https://github.com/webtorrent/webtorrent/issues/new)** to report bugs
- **[Fix an issue](https://github.com/webtorrent/webtorrent/issues?state=open)**. WebTorrent
is an [OPEN Open Source Project](CONTRIBUTING.md)!

### Who is using WebTorrent today?
Expand Down Expand Up @@ -212,13 +212,13 @@ MaxCDN) for easy inclusion on your site:
WebTorrent also works in node.js, using the *same npm package!* It's mad science!

**NOTE**: To connect to "web peers" (browsers) in addition to normal BitTorrent peers, use
[webtorrent-hybrid](https://github.com/feross/webtorrent-hybrid) which includes WebRTC
[webtorrent-hybrid](https://github.com/webtorrent/webtorrent-hybrid) which includes WebRTC
support for node.

#### As a command line app

WebTorrent is also available as a
[command line app](https://github.com/feross/webtorrent-cli). Here's how to use it:
[command line app](https://github.com/webtorrent/webtorrent-cli). Here's how to use it:

```bash
$ npm install webtorrent-cli -g
Expand Down Expand Up @@ -281,17 +281,17 @@ These are the main modules that make up WebTorrent:
| [ut_metadata][ut_metadata] | [![][ut_metadata-ti]][ut_metadata-tu] | [![][ut_metadata-ni]][ut_metadata-nu] | metadata for magnet uris (protocol extension)
| [ut_pex][ut_pex] | [![][ut_pex-ti]][ut_pex-tu] | [![][ut_pex-ni]][ut_pex-nu] | peer discovery (protocol extension)

[webtorrent]: https://github.com/feross/webtorrent
[webtorrent-gitter-url]: https://gitter.im/feross/webtorrent
[webtorrent-ti]: https://img.shields.io/travis/feross/webtorrent/master.svg
[webtorrent-tu]: https://travis-ci.org/feross/webtorrent
[webtorrent]: https://github.com/webtorrent/webtorrent
[webtorrent-gitter-url]: https://gitter.im/webtorrent/webtorrent
[webtorrent-ti]: https://img.shields.io/travis/webtorrent/webtorrent/master.svg
[webtorrent-tu]: https://travis-ci.org/webtorrent/webtorrent
[webtorrent-ni]: https://img.shields.io/npm/v/webtorrent.svg
[webtorrent-nu]: https://www.npmjs.com/package/webtorrent
[webtorrent-desktop]: https://webtorrent.io/desktop

[bittorrent-dht]: https://github.com/feross/bittorrent-dht
[bittorrent-dht-ti]: https://img.shields.io/travis/feross/bittorrent-dht/master.svg
[bittorrent-dht-tu]: https://travis-ci.org/feross/bittorrent-dht
[bittorrent-dht]: https://github.com/webtorrent/bittorrent-dht
[bittorrent-dht-ti]: https://img.shields.io/travis/webtorrent/bittorrent-dht/master.svg
[bittorrent-dht-tu]: https://travis-ci.org/webtorrent/bittorrent-dht
[bittorrent-dht-ni]: https://img.shields.io/npm/v/bittorrent-dht.svg
[bittorrent-dht-nu]: https://www.npmjs.com/package/bittorrent-dht

Expand All @@ -301,33 +301,33 @@ These are the main modules that make up WebTorrent:
[bittorrent-peerid-ni]: https://img.shields.io/npm/v/bittorrent-peerid.svg
[bittorrent-peerid-nu]: https://www.npmjs.com/package/bittorrent-peerid

[bittorrent-protocol]: https://github.com/feross/bittorrent-protocol
[bittorrent-protocol-ti]: https://img.shields.io/travis/feross/bittorrent-protocol/master.svg
[bittorrent-protocol-tu]: https://travis-ci.org/feross/bittorrent-protocol
[bittorrent-protocol]: https://github.com/webtorrent/bittorrent-protocol
[bittorrent-protocol-ti]: https://img.shields.io/travis/webtorrent/bittorrent-protocol/master.svg
[bittorrent-protocol-tu]: https://travis-ci.org/webtorrent/bittorrent-protocol
[bittorrent-protocol-ni]: https://img.shields.io/npm/v/bittorrent-protocol.svg
[bittorrent-protocol-nu]: https://www.npmjs.com/package/bittorrent-protocol

[bittorrent-tracker]: https://github.com/feross/bittorrent-tracker
[bittorrent-tracker-ti]: https://img.shields.io/travis/feross/bittorrent-tracker/master.svg
[bittorrent-tracker-tu]: https://travis-ci.org/feross/bittorrent-tracker
[bittorrent-tracker]: https://github.com/webtorrent/bittorrent-tracker
[bittorrent-tracker-ti]: https://img.shields.io/travis/webtorrent/bittorrent-tracker/master.svg
[bittorrent-tracker-tu]: https://travis-ci.org/webtorrent/bittorrent-tracker
[bittorrent-tracker-ni]: https://img.shields.io/npm/v/bittorrent-tracker.svg
[bittorrent-tracker-nu]: https://www.npmjs.com/package/bittorrent-tracker

[create-torrent]: https://github.com/feross/create-torrent
[create-torrent-ti]: https://img.shields.io/travis/feross/create-torrent/master.svg
[create-torrent-tu]: https://travis-ci.org/feross/create-torrent
[create-torrent]: https://github.com/webtorrent/create-torrent
[create-torrent-ti]: https://img.shields.io/travis/webtorrent/create-torrent/master.svg
[create-torrent-tu]: https://travis-ci.org/webtorrent/create-torrent
[create-torrent-ni]: https://img.shields.io/npm/v/create-torrent.svg
[create-torrent-nu]: https://www.npmjs.com/package/create-torrent

[magnet-uri]: https://github.com/feross/magnet-uri
[magnet-uri-ti]: https://img.shields.io/travis/feross/magnet-uri/master.svg
[magnet-uri-tu]: https://travis-ci.org/feross/magnet-uri
[magnet-uri]: https://github.com/webtorrent/magnet-uri
[magnet-uri-ti]: https://img.shields.io/travis/webtorrent/magnet-uri/master.svg
[magnet-uri-tu]: https://travis-ci.org/webtorrent/magnet-uri
[magnet-uri-ni]: https://img.shields.io/npm/v/magnet-uri.svg
[magnet-uri-nu]: https://www.npmjs.com/package/magnet-uri

[parse-torrent]: https://github.com/feross/parse-torrent
[parse-torrent-ti]: https://img.shields.io/travis/feross/parse-torrent/master.svg
[parse-torrent-tu]: https://travis-ci.org/feross/parse-torrent
[parse-torrent]: https://github.com/webtorrent/parse-torrent
[parse-torrent-ti]: https://img.shields.io/travis/webtorrent/parse-torrent/master.svg
[parse-torrent-tu]: https://travis-ci.org/webtorrent/parse-torrent
[parse-torrent-ni]: https://img.shields.io/npm/v/parse-torrent.svg
[parse-torrent-nu]: https://www.npmjs.com/package/parse-torrent

Expand All @@ -337,15 +337,15 @@ These are the main modules that make up WebTorrent:
[render-media-ni]: https://img.shields.io/npm/v/render-media.svg
[render-media-nu]: https://www.npmjs.com/package/render-media

[torrent-discovery]: https://github.com/feross/torrent-discovery
[torrent-discovery-ti]: https://img.shields.io/travis/feross/torrent-discovery/master.svg
[torrent-discovery-tu]: https://travis-ci.org/feross/torrent-discovery
[torrent-discovery]: https://github.com/webtorrent/torrent-discovery
[torrent-discovery-ti]: https://img.shields.io/travis/webtorrent/torrent-discovery/master.svg
[torrent-discovery-tu]: https://travis-ci.org/webtorrent/torrent-discovery
[torrent-discovery-ni]: https://img.shields.io/npm/v/torrent-discovery.svg
[torrent-discovery-nu]: https://www.npmjs.com/package/torrent-discovery

[ut_metadata]: https://github.com/feross/ut_metadata
[ut_metadata-ti]: https://img.shields.io/travis/feross/ut_metadata/master.svg
[ut_metadata-tu]: https://travis-ci.org/feross/ut_metadata
[ut_metadata]: https://github.com/webtorrent/ut_metadata
[ut_metadata-ti]: https://img.shields.io/travis/webtorrent/ut_metadata/master.svg
[ut_metadata-tu]: https://travis-ci.org/webtorrent/ut_metadata
[ut_metadata-ni]: https://img.shields.io/npm/v/ut_metadata.svg
[ut_metadata-nu]: https://www.npmjs.com/package/ut_metadata

Expand Down Expand Up @@ -384,8 +384,6 @@ localStorage.removeItem('debug')
- May 2014 (JS.LA) – [How I Built a BitTorrent Client in the Browser](https://vimeo.com/97324247) (progress update; node client working)
- Oct 2013 (RealtimeConf) – [WebRTC Black Magic](https://vimeo.com/77265280) (first mention of idea for WebTorrent)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

### License

MIT. Copyright (c) [WebTorrent, LLC](https://webtorrent.io).
MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org) and [WebTorrent, LLC](https://webtorrent.io).
16 changes: 8 additions & 8 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ If `opts` is specified, then the default options (shown below) will be overridde
```

For possible values of `opts.dht` see the
[`bittorrent-dht` documentation](https://github.com/feross/bittorrent-dht#dht--new-dhtopts).
[`bittorrent-dht` documentation](https://github.com/webtorrent/bittorrent-dht#dht--new-dhtopts).

For possible values of `opts.tracker` see the
[`bittorrent-tracker` documentation](https://github.com/feross/bittorrent-tracker#client).
[`bittorrent-tracker` documentation](https://github.com/webtorrent/bittorrent-tracker#client).

## `client.add(torrentId, [opts], [function ontorrent (torrent) {}])`

Expand All @@ -77,7 +77,7 @@ Start downloading a new torrent.
- magnet uri (string)
- torrent file (buffer)
- info hash (hex string or buffer)
- parsed torrent (from [parse-torrent](https://github.com/feross/parse-torrent))
- parsed torrent (from [parse-torrent](https://github.com/webtorrent/parse-torrent))
- http/https url to a torrent file (string)
- filesystem path to a torrent file (string) *(Node.js only)*

Expand Down Expand Up @@ -125,7 +125,7 @@ Or, an **array of `string`, `File`, `Buffer`, or `stream.Readable` objects**.

If `opts` is specified, it should contain the following types of options:

- options for [create-torrent](https://github.com/feross/create-torrent#createtorrentinput-opts-function-callback-err-torrent-) (to allow configuration of the .torrent file that is created)
- options for [create-torrent](https://github.com/webtorrent/create-torrent#createtorrentinput-opts-function-callback-err-torrent-) (to allow configuration of the .torrent file that is created)
- options for `client.add` (see above)

If `onseed` is specified, it will be called when the client has begun seeding the file.
Expand Down Expand Up @@ -428,9 +428,9 @@ Emitted whenever data is uploaded. Useful for reporting the current torrent stat
## `torrent.on('wire', function (wire) {})`

Emitted whenever a new peer is connected for this torrent. `wire` is an instance of
[`bittorrent-protocol`](https://github.com/feross/bittorrent-protocol), which is a
[`bittorrent-protocol`](https://github.com/webtorrent/bittorrent-protocol), which is a
node.js-style duplex stream to the remote peer. This event can be used to specify
[custom BitTorrent protocol extensions](https://github.com/feross/bittorrent-protocol#extension-api).
[custom BitTorrent protocol extensions](https://github.com/webtorrent/bittorrent-protocol#extension-api).

Here is a usage example:

Expand All @@ -444,7 +444,7 @@ torrent1.on('wire', function (wire, addr) {
```

See the `bittorrent-protocol`
[extension api docs](https://github.com/feross/bittorrent-protocol#extension-api) for more
[extension api docs](https://github.com/webtorrent/bittorrent-protocol#extension-api) for more
information on how to define a protocol extension.

## `torrent.on('noPeers', function (announceType) {})`
Expand Down Expand Up @@ -479,7 +479,7 @@ Useful if you know you need the file at a later stage.
Deselects the file, which means it won't be downloaded unless someone creates a stream
for it.

*Note: This method is currently not working as expected, see [dcposch answer on #164](https://github.com/feross/webtorrent/issues/164) for a nice work around solution.
*Note: This method is currently not working as expected, see [dcposch answer on #164](https://github.com/webtorrent/webtorrent/issues/164) for a nice work around solution.

## `stream = file.createReadStream([opts])`

Expand Down
24 changes: 12 additions & 12 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ There's also a list of WebTorrent-powered alternatives to centralized services h
[webtorrent-clones]: https://github.com/DiegoRBaquero/awesome-webtorrent-clones

[webtorrent-desktop]: https://webtorrent.io/desktop
[webtorrent-desktop-source]: https://github.com/feross/webtorrent-desktop
[instant.io-source]: https://github.com/feross/instant.io
[webtorrent-desktop-source]: https://github.com/webtorrent/webtorrent-desktop
[instant.io-source]: https://github.com/webtorrent/instant.io
[gittorrent]: http://blog.printf.net/articles/2015/05/29/announcing-gittorrent-a-decentralized-github/
[gittorrent-source]: https://github.com/cjb/GitTorrent
[filepizza]: http://file.pizza/
Expand Down Expand Up @@ -218,7 +218,7 @@ client.add(torrentId, function (torrent) {
})
```

This supports video, audio, images, PDFs, Markdown, [and more][append-to], right
This supports video, audio, images, PDFs, Markdown, [and more][render-media], right
out of the box. There are additional ways to access file content directly, including
as a node-style stream, Buffer, or Blob URL.

Expand Down Expand Up @@ -369,8 +369,8 @@ If you're looking for help getting started, come join us in [Gitter][gitter] or
IRC at `#webtorrent` (freenode) and how you can get started.


[open-issues]: https://github.com/feross/webtorrent/issues?state=open
[contributing]: https://github.com/feross/webtorrent/blob/master/CONTRIBUTING.md
[open-issues]: https://github.com/webtorrent/webtorrent/issues?state=open
[contributing]: https://github.com/webtorrent/webtorrent/blob/master/CONTRIBUTING.md

## Where can I learn more?

Expand Down Expand Up @@ -503,8 +503,8 @@ Streaming support depends on support for `MediaSource` API in the browser. All
modern browsers have `MediaSource` support. In Firefox, support was added in
Firefox 42 (i.e. Firefox Nightly).

[Many file types][append-to] are supported (again, depending on browser support),
but only `.mp4`, `.m4v`, and `.m4a` have full support, including seeking.
[Many file types][render-media] are supported (again, depending on browser support),
but only `.mp4`, `.m4v`, and `.m4a` have full support, including seeking.

To support video/audio streaming of arbitrary files, WebTorrent uses the
[`videostream`][videostream] package, which in turn uses [`mp4box.js`][mp4box.js].
Expand All @@ -520,13 +520,13 @@ Open an issue on the WebTorrent [issue tracker][issues], or join us in
[Gitter][gitter] or on IRC at `#webtorrent` (freenode).

[webtorrent-io]: https://webtorrent.io
[append-to]: https://github.com/feross/webtorrent/blob/master/lib/append-to.js#L6-L14
[gitter]: https://gitter.im/feross/webtorrent
[render-media]: https://github.com/feross/render-media/blob/master/index.js
[gitter]: https://gitter.im/webtorrent/webtorrent
[instant.io]: https://instant.io
[issues]: https://github.com/feross/webtorrent/issues
[license]: https://github.com/feross/webtorrent/blob/master/LICENSE
[issues]: https://github.com/webtorrent/webtorrent/issues
[license]: https://github.com/webtorrent/webtorrent/blob/master/LICENSE
[peercdn]: http://www.peercdn.com/
[playback]: https://mafintosh.github.io/playback/
[pr]: https://github.com/feross/webtorrent
[pr]: https://github.com/webtorrent/webtorrent
[webtorrent-hybrid]: https://npmjs.com/package/webtorrent-hybrid
[webtorrent]: https://npmjs.com/package/webtorrent
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ WebTorrent.prototype._onListening = function () {

if (this._tcpPool) {
// Sometimes server.address() returns `null` in Docker.
// WebTorrent issue: https://github.com/feross/bittorrent-swarm/pull/18
var address = this._tcpPool.server.address()
if (address) this.torrentPort = address.port
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tcp-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TCPPool.prototype._onConnection = function (conn) {
// If the connection has already been closed before the `connect` event is fired,
// then `remoteAddress` will not be available, and we can't use this connection.
// - Node.js issue: https://github.com/nodejs/node-v0.x-archive/issues/7566
// - WebTorrent issue: https://github.com/feross/webtorrent/issues/398
// - WebTorrent issue: https://github.com/webtorrent/webtorrent/issues/398
if (!conn.remoteAddress) {
conn.on('error', noop)
conn.destroy()
Expand Down
Loading

0 comments on commit b4e79a3

Please sign in to comment.