kern / filepizza

:pizza: Peer-to-peer file transfers in your browser
https://file.pizza
Other
4.39k stars 332 forks source link

Headless? Perhaps via PhantomJS? #15

Open nogweii opened 9 years ago

nogweii commented 9 years ago

Is it possible to launch a headless browser to mange the upload half of sharing a file? My idea is a command-line fire & forget, since I tend to close my browser often.

kern commented 9 years ago

This is a great idea. I don't believe PhantomJS currently supports WebRTC, though. Since the app is isomorphic, we should be able to spin up a connection without running a browser instance.

PeerJS doesn't have good support for isomorphic apps, so I'm considering migrating to the recently released Socket P2P or WebTorrent to support stuff like this. I'll dive into this when I find some time. :)

ronilaukkarinen commented 8 years ago

Some sort of CLI client would be awesome. :+1:

bzz commented 8 years ago

How about SlimerJS? Or actually it does not really need to be headless - just CLI would do as well, as having a browser process already running is quite common for a desktop environment.

Or using Electron it should be possible to build 40+mb standalone app..

kern commented 8 years ago

Don't have time to dedicate to this but happy to merge a PR on this.

willstott101 commented 4 years ago

There's a great WebRTC library in Go by Pion: https://github.com/pion/webrtc A trivial upload client could be written with that. Go being compiled and easy to cross-compile feels like a better idea than JS for a CLI. Perhaps pending #102 ... IDK how WebTorrent works but it'd probably be simpler once that's gone.