TortugaPower / BookPlayer

Player for your DRM-free audiobooks
GNU General Public License v3.0
1.53k stars 186 forks source link

Provide browser-based alternative to AirDrop #362

Open LarsaSolidor opened 5 years ago

LarsaSolidor commented 5 years ago

Add the ability to upload audio books to BookPlayer through a web browser on another computer, similar to how Infuse Player allows this by creating a web server which can be navigated to on another computer and media files transferred.

The motiviation being wireless transfer of files without the use of the internet, especially on older (Mac < 2012) hardware which does not support the current standard for AirDrop

GianniCarlo commented 5 years ago

I thought we had a ticket for this, but it turns out in the early days I closed it (#6) after Airdrop support was put in 😅. I do agree about having this feature, windows users also don't have access to Airdrop, and it would be handy to have Wifi transfer available

GianniCarlo commented 5 years ago

I'm kind of with my hands full on other features for the next release, but if anybody wants to help out, I remember considering this framework to put up a web server: https://github.com/httpswift/swifter , I'm sure there are options as well 👍

pichfl commented 5 years ago

I think it would make a great addition, especially for our Windows users.

Fahad-Alsaidi commented 4 years ago

As Linux user, there is no Airdrop support. So please consider it.

caseynf commented 4 years ago

Yes, please incorporate this feature asap. Thank you for the good work.

pichfl commented 4 years ago

While there is no such thing as "asap" in OpenSource, I began some early investigation in way of providing this.

There are ways to implement something impressively similar using WebRTC (which would require us providing some sort of beacon service). See Snapdrop for an example.

Another option would be to spin up a custom HTTP server and serve a small website directly from your phone. Projects like GCDWebServer provide this sort of thing.

The former provides much better user ergonomics, including auto-discovery and no fumbling with IP-addresses whatsoever. That is if everything works. If you're in a non-ideal network environment (corporate, et all), this will break pretty easily. Also it requires us to run, maintain and pay for a WebServer or service (relying on "free" tiers of various services is never a good idea for a product with actual customers).

The latter is self-contained inside the app, which is a big plus on maintenance but does require users to enter the IP address of their iPhone on their desktop, as well as port etc, which might require a bit of tech-savviness.

I think most of our users should be involved enough to type something like http://127.0.0.1:8080 (sic!) into their browser, so I'd favor the second option for implementation. As always I'd be happy to provide visual design for both the workflow as well as the upload screen etc. on request.


While we do not have the feature yet, Snapdrop might be a good solution until we put something into BookPlayer. It works well and files received on iOS 13 will end up in the files app and can be imported into BookPlayer from there.

megasuperlexa commented 4 years ago

Add the ability to upload audio books to BookPlayer through a web browser on another computer, similar to how Infuse Player allows this by creating a web server which can be navigated to on another computer and media files transferred.

The motiviation being wireless transfer of files without the use of the internet, especially on older (Mac < 2012) hardware which does not support the current standard for AirDrop

I use https://web.telegram.org to achieve precisely what you described.

LarsaSolidor commented 4 years ago

Add the ability to upload audio books to BookPlayer through a web browser on another computer, similar to how Infuse Player allows this by creating a web server which can be navigated to on another computer and media files transferred. The motiviation being wireless transfer of files without the use of the internet, especially on older (Mac < 2012) hardware which does not support the current standard for AirDrop

I use https://web.telegram.org to achieve precisely what you described.

I don’t see how you can use an encrypted messaging service to upload books from a computer to an iPhone.

Perhaps you could elaborate on your method?

megasuperlexa commented 4 years ago

Perhaps you could elaborate on your method?

sure, I have detailed instructions over here: https://github.com/megasuperlexa/audiobook-convert Section "How do I load my book to iPhone".

Although I believe there are other messengers out there, that have the web-interface and an ability to send messages to yourself, but I just use Telegram on a daily basis, so I use that.

megasuperlexa commented 4 years ago

oh, I didnt realize you wrote "WITHOUT internet", sorry. This method requires internet of course, but just for a brief period of uploading.

pichfl commented 4 years ago

@LarsaSolidor an alternative using only the local network and iOS13 is to use the Files.app to connect to a SMB or WebDAV share on your machine.

  1. Depending on your Linux (see here if you use Ubuntu), configure a share.
  2. Open the Files.app and tap the "…" in the upper right corner of the main screen.
  3. Select "Connect to server" from the menu
  4. Fill in the url to your share. e.g. smb://computername.local (you might have to add a port if you run Samba in anything but the default one)
  5. Fill in your user credentials
  6. Find the file you want to import (if using mp3s, consider creating a single zip archive or use an m4b container)
  7. Long press / force touch on the file
  8. Select "Share" (this is not intuitive at all, thanks Apple)
  9. Select "Save to Files"
  10. Wait for download
  11. Go to BookPlayer and import the file from Files.app

Sadly, Apple doesn't show the connect to server thing on the screen we invoke for the file imports. Fingers crossed this changes some day.

buhund commented 4 years ago

Just started using BookPlayer, and I'm throwing my vote in for wanting the transfer via wifi in a browser thing :+1: Keep up the great work, and enjoy the coffee <3

ansh commented 3 years ago

This app has a very similar feature that we can look for inspiration. I can begin testing this out if someone wants to help! https://apps.apple.com/us/app/audiobook-player-smartbook/id1228166161

pichfl commented 3 years ago

That player uses the GDCWebServer I mentioned earlier. Testing is not an issue here, we just need time or someone to step in and design and implement this so it fits well into BookPlayer.

ansh commented 3 years ago

So the major bottleneck is just seamless design into the BookPlayer app?

pichfl commented 3 years ago

No, the major bottleneck is someone writing the actual code. Keep in mind, this is a hobby project and we work on this at our own pace.

tgjma commented 3 years ago

How about providing an option to import from an URL, that way the file can be placed on a web server on the computer and it can be imported into the app using URL to the file.

pichfl commented 3 years ago

There already is an option to import via the bookplayer:// interface.

Aside that we can't expect every user to know how to run or setup their own web server. The goal for BookPlayer is to have the best and easiest way to enjoy audiobooks and given how many of our users are not on Macs like us maintainers, we must face the reality of a rather diverse ecosystem and should provide this in the easiest way we can.

There was some progress on this, I did implement a barebones upload page, but the required dependencies are too big so I'm looking into smaller frontend options. It would be weird to have an uploader page that is about the same size as the rest of the app. It would also be weird if it requires manual refresh and doesn't support drag & drop. Either is possible and makes the experience much better.

LarsaSolidor commented 3 years ago

There already is an option to import via the bookplayer:// interface.

Aside that we can't expect every user to know how to run or setup their own web server. The goal for BookPlayer is to have the best and easiest way to enjoy audiobooks and given how many of our users are not on Macs like us maintainers, we must face the reality of a rather diverse ecosystem and should provide this in the easiest way we can.

There was some progress on this, I did implement a barebones upload page, but the required dependencies are too big so I'm looking into smaller frontend options. It would be weird to have an uploader page that is about the same size as the rest of the app. It would also be weird if it requires manual refresh and doesn't support drag & drop. Either is possible and makes the experience much better.

I’ve written a small react front end up to upload files that supports drag and drop using react. It’s about 200kB in total… is that too large? This is what the server inside the app would serve; I’m more than happy to help with this component, but have no idea how to integrate with a mobile app

tgjma commented 3 years ago

There already is an option to import via the bookplayer:// interface.

Ah, found the URL scheme for importing from an URL. That would do for me. Thank you.

GianniCarlo commented 3 years ago

For future reference, there's an entry in the wiki 👌 link

pichfl commented 3 years ago

For further reference, this is the current mockup for this feature: Artboard

These are additional states for the drop area: Artboard Copy

The coloring is done in a way that allows for very smooth CSS transitions and the gradients used will show up in other places of the next UI iteration as well.