![]() ![]() In addition to magnet uris, WebTorrent supports many ways to specify a torrent. Object, so it can be used with just a script tag: ( ) which exposes WebTorrent on the window WebTorrent is also available as a standalone script Import WebTorrent from 'webtorrent/dist/' and skip the webpack configuration. Or, you can just use the pre-built version via However, webpack requires extra configuration which you can find in the webpack bundle config used by webtorrent. WebTorrent also works with webpack, another moduleīundler. You use node-style require() to organize your browser code and load modules installed by npm (as seen in the previous examples). WebTorrent works great with browserify, an npm package that lets There are more examples in docs/get-started.md. Import dragDrop from 'drag-drop' import WebTorrent from 'webtorrent' const client = new WebTorrent ( ) // When user drops files on the browser, create a new torrent and start seeding it! dragDrop ( 'body', files => ) To install WebTorrent for use in node or the browser with import WebTorrent from 'webtorrent', run: Supports Chrome, Firefox, Opera and Safari. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |