ubports / music-app

Moved to GitLab
https://gitlab.com/ubports/app-dev/music-app
GNU General Public License v3.0
8 stars 10 forks source link

Music player - store position of audio playback for better support of audiobooks #8

Open NeoTheThird opened 6 years ago

NeoTheThird commented 6 years ago

From @twinkybot on December 14, 2017 8:44

Actually this is a feature request.

Steps to reproduce

  1. Listen to any audiobook
  2. e.g. restart app or phone

Expected behavoir

The file should be played from last position

Actual behavior

I think it starts from either the files beginning or some other file when it stored the position

Logfiles and additional information

...

Copied from original issue: ubports/ubuntu-touch#360

ahayzen commented 6 years ago

This is tricky, storing the position could be done when the position changes (this hits the disk a lot or the app is closed. However as we were aiming to have a normal app lifecycle you wouldn't be able to do either of these in certain cases (process suspended or OOM has been hit).

The original feature request is here [0] and the tracking of the required information to be sync'd from media-hub to allow for the music-app to have a normal app lifecycle is here [1] - note along with the currentIndex the currentPositon could be passed as well.

0 - https://bugs.launchpad.net/music-app/+bug/1445158 1 - https://bugs.launchpad.net/ubuntu/+source/media-hub/+bug/1518160

ghost commented 6 years ago

Sorry as I am not so aware of the internal workings, I did not understand what you were saying.

I certainly agree that storing it for each position change is not the proper balance. I thought along the lines of a setting. Starting e.g. from 15 maybe even 30 seconds and upwards.