advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.17k stars 161 forks source link

[Enhancement] Keep progress in sync across devices with audio player open #1146

Open 0verEngineer opened 5 months ago

0verEngineer commented 5 months ago

Describe the issue

I finally found the progress loss problem i have sometimes, the android widget is at fault.

Steps to reproduce the issue

  1. Listen on android with the widget on the home screen
  2. stop listening on android (does not matter if in the app or with the widget)
  3. start listening in the web browser (or somewhere else) and stop after some time
  4. click play on the android widget and it will continue where you stopped on android so the progress is lost after 15 sec of playtime because then it syncs the state to the server

Audiobookshelf version

v2.7.1

How are you running audiobookshelf?

Docker

advplyr commented 5 months ago

Can you share the version of the android app you are on and your android device and OS version?

I agree that it would be ideal if the open audio player on your device stays in sync as you played on other devices. I'm not sure if this is expected behavior though, it seems more like a nice-to-have thing.

The mobile apps and web client do keep in sync while the audio player is open (using web socket events), however with android when the app is in the background the process that is listening for socket events can get killed. If you're not seeing any progress syncing while the audio player is open then that is a potential bug to investigate.

Old versions of the android app made a request to the server when pressing play to get the most recent progress before it starts playing. I had to remove that because many users have servers that are slow to respond and it was a poor user experience.

0verEngineer commented 5 months ago

App version: 0.9.72-beta

A request to the server when pressing play seems like the best solution, i don't get how users can have servers that respond slow but still stream audio that seems quite strange, maybe add it back with a timeout of 0.5 sec or sth. like that

advplyr commented 5 months ago

I think for most users it would be expected that the device will continue where it left off if the audio player is kept open.

I'll put this as a feature request for now