
Only the brave movie download torrent - right! like
WebTorrent
WebTorrent is the first torrent client that works in the browser. It's easy to get started!
Install
To start using WebTorrent, simply include the script on your page.
This provides a function on the object.
Browserify
WebTorrent also works great with browserify, which lets you use rushbrookrathbone.co.uk style to organize your browser code, and load packages installed by npm.
Then use like this:
Quick Examples
Downloading a torrent (in the browser)
This supports video, audio, images, PDFs, Markdown, and more, right out of the box. There are additional ways to access file content directly, including as a node-style stream, Buffer, or Blob URL.
Video and audio content can be streamed, i.e. playback will start before the full file is downloaded. Seeking works too – WebTorrent dynamically fetches the needed torrent pieces from the network on-demand.
Note: downloading a torrent automatically seeds it, allowing the user to also serve the file to other peers
Creating a new torrent and seed it (in the browser)
This example uses the package, to make the HTML5 Drag and Drop API easier to work with.
Note: If you do not use browserify, use the standalone file . This exports a function on .
Download and save a torrent (in rushbrookrathbone.co.uk)
Creating a new torrent and seed it (in rushbrookrathbone.co.uk)
Note: Seeding a torrent to be compatible with the browser (i.e. with support for WebRTC) requires webtorrent-hybrid (note this requires Node version 12, 13 to work, Node v14 will NOT work with this module, lower node versions may also be supported)
where rushbrookrathbone.co.uk is a text file which is going to be seeded as a torrent, such as
Complete HTML page example
Looking for a more complete example? Look no further! This HTML example has a form input where the user can paste a magnet link and start a download over WebTorrent.
Best of all, it's a single HTML page, under 70 lines!
If the torrent contains images, videos, audio, or other playable files (with supported codecs), they will be added to the DOM and streamed, even before the full content is downloaded.
HTML example with status showing UI
This complete HTML example mimics the UI of the rushbrookrathbone.co.uk homepage. It downloads the rushbrookrathbone.co.ukt file, streams it in the browser and outputs some statistics to the user (peers, progress, remaining time, speed).
You can try it right now on CodePen to see what it looks like and play around with it!
Feel free to replace with other torrent files, or magnet links, but keep in mind that the browser can only download torrents that are seeded by WebRTC peers (web peers). Use WebTorrent Desktop or rushbrookrathbone.co.uk to seed torrents to the WebTorrent network.
More Documentation
Check out the API Documentation and FAQ for more details.
-
-