LeoKlaus / plappa

An Audiobook client for Jellyfin and AudioBookShelf, written in Swift/SwiftUI.
https://plappa.me
160 stars 0 forks source link

[BUG] Remote Playback not working #30

Closed mutschler closed 2 months ago

mutschler commented 2 months ago

Describe the bug Remote audiobooks & podcasts are not played when selected

To Reproduce Steps to reproduce the behavior:

  1. Go to Any Page
  2. Tap on any Audiobook which is not downloaded
  3. See error

Expected behavior Play the selected audiobook

Environment(please complete the following information):

LeoKlaus commented 2 months ago

I believe this is related to #34. I haven't found the underlying issue yet, but many users have reported that disconnecting and reconnecting to the server helped with this.

mutschler commented 2 months ago

So I've did some more testing:

reconnecting to the server didn't really work for me sadly :(

however i found out some other stuff:

It seems like streaming isn't really supported? When i hit play on a non downloaded file i get the playing bar at the bottom and nothing happens for a while (i guess the file is beeing requested/downloaded in the background to be able to play it) which makes sense, but some kind of visualisation would be nice.

I'm not entirely shure if "streaming" makes sense at all. Apples Podcast app as well as Audible for example don't even support that at all which IMHO is totally fine. Just donwload the book and play it offline! Makes sense anyway since you'll need to have the whole file at the end anyway to be able to listen to it.

What might be an option is what audible does: Hit the Entry, get a download indicator, once there is enough data downloaded to start playback, you'll get the option to start listening while the download is still handled in the background.

Another thing i found: When playback of a element is started (non downloaded) and i try to play another entry (also non downloaded) it keeps playing the previously started one. That's really weird! i guess that there's some strange things happening when trying to play non downloaded media files and somehow the player gets confused.

See attached video: I've started playing a book, then try to start the playback of 2 other books which keep unpausing the book started first. Then try a book which is available offline which works, and then switch again which doesn't work https://github.com/LeoKlaus/plappa/assets/18465333/15be9044-49ed-4d34-bba3-b228d8ce2d78

LeoKlaus commented 2 months ago

Well, funnily enough, this is directly related to #31. The detailed metadata (most notably chapters) are only loaded once you either start a download or open the detail page for an audiobook. Until the chapters are loaded, plappa will not play an audiobook (it shouldn't interfere with playback of other books, though, that's an oversight).

This is the reason the downloaded books work (metadata is collected while downloading the file). Streaming itself is supported and works pretty quick and reliable with both ABS and Jellyfin (in my experience), as you can see in the video I sent you in #31, the stream only needs a couple of seconds to buffer before starting (that book wasn't downloaded).