# WebTorrent

WebTorrent is a peer-to-peer (P2P) streaming torrent client written in JavaScript, from the same author, Feross Aboukhadijeh, of YouTube Instant, and the team at WebTorrent and on GitHub, for use in web browsers, as well as a WebTorrent Desktop stand alone version able to bridge WebTorrent and BitTorrent serverless networks.

## History

Before creating WebTorrent, the developers first created PeerCDN, a peer-to-peer content delivery network which was bought by Yahoo! in 2013.
The idea behind WebTorrent is to make a BitTorrent-like protocol that works on the web browser, maintaining as much compatibility with BitTorrent as possible. Any web browser should be able to connect to a peer-to-peer swarm, fetch content, verify that it is correct, and display it to the user – all as much as possible without centralized servers relying on a network entirely of people's browsers. WebTorrent uses the same protocol as BitTorrent but uses a different transport layer. WebTorrent primarily relies on WebRTC connections, while BitTorrent uses TCP connections and UDP datagrams directly.

## WebTorrent Desktop

The WebTorrent Desktop bridges the two networks of WebRTC-based WebTorrent and TCP/UDP-based BitTorrent simultaneously. The BitTorrent client Vuze (formerly Azureus) less gracefully but adequately functionally incorporated WebTorrent adding simultaneous network bridging to their software. The developers used Electron that makes desktop apps using JavaScript with access to all the APIs from Chrome and Node.

## Functionality

Online video is the core focus as that is where WebTorrent is most useful. It is less suited for smaller files or data sets but is ideal for larger files.
File availability, as with BitTorrents, is dependent on torrent seeding. If only a few users are sharing a file, then an HTTP server that provides webseeding would be the fallback. There is no sharing without webseeding. However, this could have some positive implications. Rather than using a middleman upload site to share a large private file with another person, with WebTorrent you may directly connect without leaving traces somewhere or potentially being archived on some upload site. You simply drag and drop your file to create a magnet link that you can share with your friend. Connections are already encrypted, but you may add extra layers of encryption with keys to send another way. RAM limits may be managed with IndexedDB.
The client prioritizes downloading pieces chronologically, so that the file is able to be streamed uninterrupted even before the download is complete.

## Adoption

WebTorrent uses widely supported open web standards like WebRTC and therefore works in any modern browser, including Google Chrome, Firefox, and Opera for Desktop and Android, Microsoft Edge and Safari.

### Brave

Brave web browser bundles WebTorrent into the native executables and integrates WebTorrent into its UI.

### Torrent Clients

Some torrent clients supports seeding to WebTorrent peers, for example BiglyBT (has Android version) and clients based on the libtorrent like QBittorrent, Deluge and LibreTorrent (Android).

### Websites
#### BitChute

Launched in 2017, BitChute is a video hosting service that used WebTorrent P2P technology. It claimed in order to ease bandwidth issues of centralized streaming. According to Fredrick Brennan, there is little evidence BitChute actually uses peer-to-peer technology. By April 2021, the option to host videos using WebTorrent on BitChute "appears to have been deprecated", according to Ars Technica.

#### PeerTube

PeerTube formerly used WebTorrent but stopped because of maintaining complexity.