Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webtorrent:// protocol handler #83

Closed
feross opened this issue Mar 8, 2016 · 62 comments
Closed

Add webtorrent:// protocol handler #83

feross opened this issue Mar 8, 2016 · 62 comments

Comments

@feross
Copy link
Member

feross commented Mar 8, 2016

Moved into it's own issue from #54 (comment)...

Since torrent streaming isn't supported by most popular torrent managers; developers and websites could make an integration for this without requiring users to rethink their default torrent configurations.

Websites that share torrent files generally have links such as 'Download Torrent' and 'Open Magnet'. Imagine an extra link saying 'Stream Torrent'. That's what I'd like to see.

Bonus suggestion: decide on a general torrent streaming protocol (i.e. str://<magnet>) with https://github.com/jaruba/PowderPlayer so that developers can simply add 'Stream Torrent` links that support any torrent app with the protocol!

@giuscri
Copy link
Contributor

giuscri commented Mar 9, 2016

+1

@ungoldman
Copy link
Contributor

Here's some info on that: electron/packager#59

See also @jden's https://www.npmjs.com/package/register-protocol-handler (currently win32 only)

@junosuarez
Copy link

junosuarez commented Mar 11, 2016

Thanks for the mention, @ungoldman - disclaimer, that was kind of experimental and I don't know if it's actually being used anywhere currently, ymmv.
Electron does something that I think works crossplatform for this

@Flet
Copy link
Member

Flet commented Mar 11, 2016

@ungoldman
Copy link
Contributor

Looks like the github issue had better google juice than the atom docs, thanks for finding that Flet! That looks a lot more up to date.

@feross
Copy link
Member Author

feross commented Mar 20, 2016

@jden @Flet @ungoldman The protocol module only works for the URL requests inside Electron. There are OS-specific ways to make this work. Here's how I did it for OS X: https://github.com/feross/webtorrent-app/pull/164/files#diff-9109eccc4c03527f26f8ead0327367e8R175

@feross
Copy link
Member Author

feross commented Mar 20, 2016

Opened an issue to ask Electron to make this easier: electron/electron#4857

@feross
Copy link
Member Author

feross commented Mar 20, 2016

@jden Your module is nice and simple, but it has a native dependency to link to the .NET API, and it fails to install on non-Windows platforms, obviously.

I'm going to try using winreg to modify the registry. I've used this package before for webtorrent-cli, to locate the path to launch VLC. winreg is great because it just calls out to the REG command line program with child_process, so it's pure JavaScript. No native deps.

@feross
Copy link
Member Author

feross commented Mar 20, 2016

@jden Okay, here's the approach I went with: https://github.com/feross/webtorrent-app/blob/2b555e12b868b0610838e55f98a0b1d6705f49d6/main/register-protocol-handler.js#L7-L46

What do you think? If you're down, we can replace your package register-protocol-handler-windows with this approach and then WebTorrent.app can depend on it.

If not, that's fine too. I can just publish this as a separate package.

@junosuarez
Copy link

@feross oh, nice, I was unaware of the pure registry solution. Thanks for linking to the msdn article in the comments! I'd happily take this as a patch to register-protocol-handler-windows.

@jaruba
Copy link

jaruba commented May 29, 2016

@feross @iadj

Bonus suggestion: decide on a general torrent streaming protocol (i.e. str://) with https://github.com/jaruba/PowderPlayer so that developers can simply add 'Stream Torrent` links that support any torrent app with the protocol!

The way google brought me here from a totally unrelated search is above my comprehension.. So? Are we making a new standard protocol for streaming torrents? (we can't name it webtorrent:// though.. lol)

Should probably include https://github.com/mafintosh/playback in our world domination plans too.

@bnjmnt4n
Copy link
Member

Playback currently uses playback://<magnet-link>.

@jaruba
Copy link

jaruba commented May 30, 2016

@demoneaux and I have pow://, a default protocol for streaming makes sense, what we're doing by each having our own custom protocol, doesn't..

@jaruba
Copy link

jaruba commented May 30, 2016

Imagine if there was utorrent:, qbittorrent:, transmission:, and so on, instead of all using magnet: :)

Someone's gotta make sense of this mess at one point, creating a default protocol for streaming torrents is the proper way of doing things.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

I see value in our app-specific protocol handlers (webtorrent:, playback:, etc.) for some situations. For example, if I want to post links to a GitHub issue that open up in WebTorrent Desktop.

So, the real question is -- do we need a new protocol handler specifically for streamable torrents? We already have magnet: for generic torrents. Is it sufficient to just take over magnet:? Or are there a significant number of users who want two torrent clients, one for normal torrents and another for streaming torrents?

@jaruba
Copy link

jaruba commented Jun 1, 2016

From my experience, I've seen many that prefer using uTorrent in combination with a streamer. And some users get frustrated as you can only match magnet: to one handler.

Whether or not a new standard protocol handler just for streaming will be embraced by web developers is the real question here. But that should not be our concern, as giving it as an option to developers can only be a good thing.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Some options:

  • stream-magnet
  • magnet-stream
  • stream
  • play-magnet
  • magnet-play

@jaruba
Copy link

jaruba commented Jun 1, 2016

i like play-magnet: :)

stream: is too general

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Another option:

  • magnet-play

Has the advantage of starting with magnet- so it will look like a magnet link to users.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Upvote this comment if you prefer stream-magnet.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Upvote this comment if you prefer magnet-stream.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Upvote this comment if you prefer play-magnet.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

Upvote this comment if you prefer magnet-play.

@feross
Copy link
Member Author

feross commented Jun 1, 2016

@jaruba Are there other developers of (legitimate) torrent streaming apps who we can ask for their opinion?

Hey @mafintosh, @freeall (Playback devs) -- do you have thoughts on this?

@jaruba
Copy link

jaruba commented Jun 1, 2016

@feross

Are there other developers of (legitimate) torrent streaming apps who we can ask for their opinion?

Maybe @Ivshti with Stremio.. If we don't include the Popcorn Time forks and friends.

I can pipe more developers into this effort as they come at WebChimera.js as I'm one of the maintainers there, but until now.. I've only seen players for local media / live streams and Popcorn Time alternative starters.

@freeall
Copy link

freeall commented Jun 24, 2016

@feross I like api's that uses names as it makes it easier to understand and debug - as an example it's easier to read and understand github.com/feross than github.com/5234 (or whatever your user id might be).

Btw, stream+magnet sounds good

@jaruba
Copy link

jaruba commented Jun 24, 2016

@feross

I'm fine with stream+magnet, as for ix being short for index, I'd rather use idx, but I get why you'd want to keep it 2 letter like the rest, so how about at=5?

@anonymlol
Copy link
Contributor

anonymlol commented Jun 24, 2016

How about id instead of ix for index? Or nr for file number.

edit: I'm fine with stream+magnet, too.

@jaruba
Copy link

jaruba commented Jun 24, 2016

@anonymlol id would be confusing, as it's short for identifier, not index

@dcposch
Copy link
Contributor

dcposch commented Jul 4, 2016

Done
#640

Shipped in v0.8.1

@dcposch dcposch closed this as completed Jul 4, 2016
@JohnDoee
Copy link

JohnDoee commented Jul 4, 2016

@dcposch How is this done ?

It's called stream-magnet, was that the final choice ?
Also, where's index support ?

@feross
Copy link
Member Author

feross commented Jul 27, 2016

Re-opening this issue as we still haven't implemented support for the ix property.

@feross feross reopened this Jul 27, 2016
@feross
Copy link
Member Author

feross commented Jul 27, 2016

@JohnDoee Yep, the final name we settled on was stream-magnet. It shipped in WebTorrent Desktop 0.8.1. Changelog here: https://github.com/feross/webtorrent-desktop/releases/tag/v0.8.1

@feross feross modified the milestones: v0.12, v0.8, v0.13 Aug 20, 2016
@jbenet
Copy link

jbenet commented Aug 26, 2016

I was summoned here months ago. Sorry my intertubes were clogged.

In general, when referencing ipfs protocols, pls use unix path notation
(/ipfs/...) and pretend the prefix fs: if you absolutely need a
standard URI.

In this case (just from above) I think it's possible to make
stream-magnet:/ipfs/... work, but I haven't had a chance to look at it in
detail, sorry.

Either way, exciting stuff! :)
On Wed, Jul 27, 2016 at 00:59 Feross Aboukhadijeh notifications@github.com
wrote:

@JohnDoee https://github.com/JohnDoee Yep, the final name we settled on
was stream-magnet. It shipped in WebTorrent Desktop 0.8.1.
https://github.com/feross/webtorrent-desktop/releases/tag/v0.8.1


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#83 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIcoTZIRsJm2i9zbOw7k1gh6SZ0gkKYks5qZuXAgaJpZM4HrfuY
.

@dcposch dcposch removed this from the v0.13 milestone Sep 9, 2016
@Raulvo
Copy link

Raulvo commented Apr 12, 2017

I am interested in support for Ace Stream. I have tried to put the hash in acestream:// URLs in a magnet link format but WebTorrent did not download anything.

@feross
Copy link
Member Author

feross commented Apr 13, 2017

@Raulvo Please open a new issue. You posted in an old, unrelated issue.

@Daniel-Abrecht
Copy link

we still haven't implemented support for the ix property

I'm for using so= instead, as described in the draft rfc here:
http://www.bittorrent.org/beps/bep_0053.html

Also, maybe this should be part of webtorrent instead of webtorrent-desktop?

And I think a possibility to specify a file by path would also be quiet handy.

@feross
Copy link
Member Author

feross commented May 17, 2018

@Daniel-Abrecht Oh, nice. This draft looks new. Let's support it and consider removing ix support: webtorrent/webtorrent#1395

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@github-actions github-actions bot added the stale label Nov 6, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests