finds.dev← search

// the find

mikeal/webtorrent-element

★ 536 · JavaScript · updated Nov 2019

WebTorrent HTML element.

A Web Component wrapper around WebTorrent that lets you drop a `<web-torrent>` element into any page to stream torrent content directly in the browser via WebRTC. It's a thin layer — the real work is WebTorrent itself. Useful for anyone building P2P media demos or experimental sites.

The single-element API is genuinely ergonomic — one script tag and a custom element is hard to beat for setup friction. Wrapping WebTorrent in a custom element means it composes naturally with any framework or plain HTML without needing a library-specific integration. The `file` attribute for multi-file torrents is a thoughtful touch that covers the most common real-world case.

Abandoned since 2019 — WebTorrent has shipped breaking changes since then and the element almost certainly doesn't work with current versions. No events or attributes exposed for progress, peer count, or download speed, so building any real UI around it means forking it. The entire project is one 70-line file with no tests; this was always a proof of concept, not a maintained component. WebRTC tracker infrastructure it depends on (the default magnet URLs use specific wss:// trackers) may no longer be reliable.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →