astral icon indicating copy to clipboard operation
astral copied to clipboard

WebTorrent Support?

Open leesalminen opened this issue 3 years ago • 5 comments

Hi there,

Wondering what the maintainers of astral think about adding web torrent support to the client? Meaning:

  • Events with a magnet: link would download from peers & render images/videos
  • Users could select 1/more images/videos to "upload" which would mean broadcasting to trackers and seeding the content.

Am open to contributing this to astral, just want to know if folks are amenable to this or no.

leesalminen avatar Dec 23 '22 21:12 leesalminen

hey! this is an interesting idea but i'm not sure I want to support this at this moment. I do agree that some sort of media support is needed, however this option is a bit niche (for example, I don't have a torrent client haha). I'd rather put my effort behind a media option based on self hosting thats accessible to everyone.

monlovesmango avatar Dec 24 '22 02:12 monlovesmango

Hi there,

Just to clarify here, WebTorrent works entirely in the browser with pure JS. Users aren’t required to have any standalone software, or take any additional steps at all, to use WebTorrent.

Basically astral would include a JS package which turns your browser into a torrent client.

100% agree that whatever the solution is, it needs to be accessible to anyone.

Check out https://github.com/webtorrent/webtorrent for docs and https://instant.io for demo.

leesalminen avatar Dec 24 '22 11:12 leesalminen

ok i'm listening (and clearly don't know much about torrents). will review both of these when I get time.

I am in the process of creating a traditional self hosted media server that integrates with astral based on nip05 in rust. see https://github.com/monlovesmango/hostr. how hard is it to retrofit traditional media server to use torrent instead?

monlovesmango avatar Dec 26 '22 03:12 monlovesmango

Hey @leesalminen :) how are you?

I started doing something (Lol About ME) and I still didn't have this context.

https://astral.ninja/note15v47k09w4ap444yr04gx08am2e470m9p48al8cl83tkdagaraz5sr8rdhz

This is my progress, what do you think of the idea?:

https://github.com/kimico/astral/commit/4bdaf37b3f0f988fe1233cb862a951c850e3d6e9

Do you already have any code?

I see some challenges(i'm ignoring it), like making sure "your media" doesn't disappear (peer count helps with that) but i will keep it simple.

kimico avatar Dec 27 '22 17:12 kimico

Hey @leesalminen :) how are you?

I started doing something (Lol About ME) and I still didn't have this context.

https://astral.ninja/note15v47k09w4ap444yr04gx08am2e470m9p48al8cl83tkdagaraz5sr8rdhz

This is my progress, what do you think of the idea?:

kimico@4bdaf37

Do you already have any code?

I see some challenges(i'm ignoring it), like making sure "your media" doesn't disappear (peer count helps with that) but i will keep it simple.

come join us here: https://github.com/damus-io/damus/discussions/272

leesalminen avatar Jan 12 '23 16:01 leesalminen