Snooze option for sleep timer
Proposed implementation is to show a local notification about the playback being stopped due to the timer, and the notification will have the action snooze which will reactivate both the book and the timer
Suggestion via app review by @salim_01
As discussed in other channels, I'm all for this, but I'd recommend that the notification is dismissed automatically after 2 minutes so you don't have to do that manually in the morning.
Agreed 👍
proposed enhancement by @carcade : Have a sound 10 secs before the audio stops and the notification appears, and if the phone is shaken, it'll reset the time left.
So, it also would be great to setup timer once and enable it globally, and every time playing a book, timer starts automatically. This eliminates the need to turn on and adjust the timer every time. I think, it will be very convenient. Are there any cases when you need to manually setup timer every time you want to listen to the audio book?
P.S. Should I move this proposal to separate issue?
yeah that could be a separate issue, to add a setting which handles making the timer global or per book
@GianniCarlo @carcade interesting approach, but adding a sound feels very intrusive, especially for people who actually want to use the sleep timer to go to sleep. I much prefer the silent original proposal.
@pichfl I think it can be enabled as desired. But consider situation, when you are going to sleep, timer comes to end, but you are able to listen some more. Without a sound you don't know when you should shake the phone, and it is easy to miss the timer end. And then you are to open your eyes, turn on your phone and resume the book. And for your case: if someone are really sleepy, to my mind he won't notice this sound.
Rssradio has a sound playrd at the end of the sleep timer and I find it very intrusive.
This is something I've been wanting on iOS for years, happy to find this project! I've got the "shake to extend" part working on my branch at sretlawd/BookPlayer@shake_to_extend .
We can't just use the motionShake event, as generally the player is in the background and on the lock screen when you're trying to fall asleep. So, I try to detect shaking motion using CoreMotion directly, which we have to permission to use while playing background audio. I borrowed the algorithm from Stripe's Android implementation, it could probably use some fine tuning though.
Still need to implement some sort of advisory that the timer is about to expire - I don't mind a few soft tones, I used ListenAudiobookPlayer on Android for a couple years and it seemed to be fine. Could also just fade out, like Audible does, since the idea of a tone doesn't seem popular. Maybe just make it an option?
Beyond that, probably need to continue "playing" at 0 volume for 30 seconds or so after the timer expires, so that there's a small window where one can restart playback without having to look at the phone.
@sretlawd I looked over at the changes, and it looks good 👌, I haven't had the time yet to test it on my device though. It'd be great if you could create a PR once you have it complete 😁
Hey @sretlawd thanks so much, after switching from Android (and Listen, which was amazing) I've been looking for something similar. Any update on getting this merged into master and released?
I run it personally, and it works but I think it’s still a little too sensitive and extends when you don’t want it to. It might just be a matter of fine tuning the “what is a shake” algorithm, but I think it might be better to start playing soft tones (or fade out, ala Audible) for 10-20s and only enable the “shake to extend” function while that tone is in progress. I was trying to figure out how to implement that when I was last looking at it. Hearing there’s some interest is motivational, I’ll see if I can take another look at it soon. :-)
On Jan 5, 2020, at 2:00 PM, Raquel Moss [email protected] wrote:
Hey @sretlawd https://github.com/sretlawd thanks so much, after switching from Android (and Listen, which was amazing) I've been looking for something similar. Any update on getting this merged into master and released?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TortugaPower/BookPlayer/issues/341?email_source=notifications&email_token=ACB6DSSCGDY3WXFGQVPQDQLQ4IU3TA5CNFSM4HC3LWNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEID5D6Q#issuecomment-570937850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACB6DSVVFLJE24XIPPOQGO3Q4IU3TANCNFSM4HC3LWNA.
Thanks! This weekend I'll try and get your branch running on my phone. I'll take a look at the code and see if there's any way I can contribute, but tbh I'm a web developer not a mobile developer and I've been meaning to learn mobile development so that I can make iOS replacement for Listen, but I've been putting it off. You're saving me from having to learn iOS development 😅
Perhaps best idea is to lower volume when the time is coming up. This is not intrusive to already sleeping person, but if you are not yet sleeping you will notice it. Shaking phone would extend time and restore back to original volume.
I'm also migrating from Android these days and looking for an app to listen my audiobooks. This project seems to be quite amazing :heart:
@sretlawd said:
I run it personally, and it works but I think it’s still a little too sensitive and extends when you don’t want it to. It might just be a matter of fine tuning the “what is a shake” algorithm, but I think it might be better to start playing soft tones (or fade out, ala Audible) for 10-20s and only enable the “shake to extend” function while that tone is in progress. I was trying to figure out how to implement that when I was last looking at it. Hearing there’s some interest is motivational, I’ll see if I can take another look at it soon. :-)
Hey man! First of all, thanks for implementing this! This feature will really come in handy! I'm very used to falling asleep listening to my audiobooks, so I'm going to love a feature like that! In fact, just like @Petahh said:
Perhaps best idea is to lower volume when the time is coming up. This is not intrusive to already sleeping person, but if you are not yet sleeping you will notice it. Shaking phone would extend time and restore back to original volume.
So, any update?
Glad to hear this feature has fans. We will be implementing it once other more pressing issues are resolved.
If there would be an update or an intend to implement, it would be visible in this issue. Keep in mind that BookPlayer is a hobby project still, so the only way to speed things up is to download Xcode and write Swift yourself. If you are interested in joining in, you can drop by our Discord 🙂
fingers crossed for this feature
Hey everyone!, I finally implemented this (2 years later 😅), it's currently live on a beta (link to join: https://testflight.apple.com/join/xLDneJXN) let me know how you feel the shake gesture recognition (I plan on adding a settings screen for the sleep timer to toggle both the fade-out and shake features in a future version)
The fade-out is basically the 'alert' when you can snooze, and after it paused, you have a 1 min window to shake the phone to restart the timer and playback. I'd like to include also a live activity for the sleep timer, but it'd have to be a future version too
cc @Zixim @MotaOcimar @Petahh @raquelxmoss @cuddawudda @carcade
just a heads-up that the first build of the beta had a crash related to some VoiceOver translation updates for v5.0.5, and it was limited to a subset of the languages we support (more info on #969), I've updated TestFlight with a new build which fixes this issue
Closing this issue, as this was included in v5.0.5 👌 (v5.0.6 currently live on the AppStore)