TortugaPower / BookPlayer

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

Reset Sleep timer with Phone Shake #1030

Open inpertior opened 11 months ago

inpertior commented 11 months ago

Feature request

I often fall asleep to audiobooks, but falling a sleep can be hard. When using current player, i will set sleep timer for X minuttes, but often find i want to extend the timer. Now i need to grab the phone, unlock, restart play and reset timer.

My suggestion is to implement the feature 'shake to reset'. This just means that if a sleep timer is active and the feature is enabled, the user can shake the phone and the sleep timer resets. This should include a ping at the end of timer and a slow fade of the sound until pause. During the fade is the users last chance for resetting with a shake, The shake to reset should work mid-way through a sleep timer duration.

This is also a great feature to have while traveling and trying to fall a sleep. You can have it active on 10 min timer, and continually reset, then when you fall a sleep, you will never need to rewind more than 10 minuttes.

Narrative

  1. Activate Sleep Timer
  2. Set sleep timer duration
  3. By end of timer a faint note is played to inform user of timer end
  4. Sound slowly fades out over a duration of 10 second
  5. Shake phone to reset timer

'Shake to reset' should be available always (5 minuttes into a 10 minuttes timer and you shake, timer to reset back to 10 minuttes) 'Shake to reset' should have a shake sensitivity levels (ie. low sens for sitting on a plane or car)

Design

For Android it is very well implemented on Smart Audiobook Player . I also see it has been implemented on Audibles App.

GianniCarlo commented 11 months ago

Hi @inpertior ! This should already be available, there's no ping sound though, but when the sound starts to fade, you have a window of 1 min to shake to restart the timer and playback (it could be less depending on iOS keeping the app active on the background after no sound is playing)

Let me know if it doesn't work

inpertior commented 11 months ago

Hey Gianni,

Thanks for providing feedback so fast. I tried the feature and it works just as you described.

I would still suggest adding the 'optimizations' i describe.

Also, i fully understand if you have other priorities and i am also well aware i don't have the technical understanding of how complicated these features are to implement.

Side notes:

Have a nice evening (timezone dependent i guess)

/Henrik

On Thu, Oct 26, 2023 at 1:03 PM Gianni Carlo @.***> wrote:

Hi @inpertior https://github.com/inpertior ! This should already be available, there's no ping sound though, but when the sound starts to fade, you have a window of 1 min to shake to restart the timer and playback (it could be less depending on iOS keeping the app active on the background after no sound is playing)

Let me know if it doesn't work

— Reply to this email directly, view it on GitHub https://github.com/TortugaPower/BookPlayer/issues/1030#issuecomment-1780898113, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDRHKDIQTTVAGSIJGME7BSLYBI7RPAVCNFSM6AAAAAA6Q4N5R2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQHA4TQMJRGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Med venlig hilsen / Best regards

Henrik Hegelund