-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Auto sleep timer #260
Comments
Smart Audiobook player also has this feature but they handle sleep timer differently. I'm not sure the best way to implement this. Would you want to set the time in settings to the time that you want the audio player to pause? So you might select 22:00 which would then pause media at that time. The other way would be setting the sleep timer at 22:00 to some length of time like 10 minutes. The problem with that implementation is we would need to add another option to set that length of time or just use a static time. |
I really like the way Smart Audiobook player implemented this, with a time range where the sleep timer is automatically enabled. One potentially interesting option would be to automatically enable the sleep timer when Android's bedtime mode is enabled. |
Also just having option to have sleep timer enabled by default until turned off manually would be great. When I am listening to audiobooks at night and wake up, I can just press the play button on my headphones to continue listening, but it keeps playing rather than keep the previous sleep settings and stop playing after couple minutes. |
@mefistos Is this how the sleep timer functions in another app you use? |
Same as others have mentioned Smart Audiobook Player on Android. As @GeorgeHahn mentioned in SAP you select time range where the sleep timer is always enabled, so for example I have 22:00 till 8:00 and if I am listening in that time the sleep timer always resets and stays on so if I hit play in the middle of the night it turns off after 20 mins. After 8:00 when I am driving or working the sleep timer is off so I can listen for longer. Or even as I said previously just having option to maybe hold the sleep timer icon for a while to keep it enabled and then hold it again to disable it would be plenty. |
I understand. The sleep timer logic will have to be redone but it seems this is the consensus on what is expected. |
If the sleep timer is being rewritten, would it be possible to also add
option to set the timer for a custom length? I like 20mins and although
once set you can add extra time in 1 min increments it would be nice to
have the option to set it to 20 or any other custom length.
…On Wed 24 Aug 2022, 00:34 advplyr, ***@***.***> wrote:
I understand. The sleep timer logic will have to be redone but it seems
this is the consensus on what is expected.
—
Reply to this email directly, view it on GitHub
<#260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UCO3KCFFTBUNYLHHS7YTV2VNYLANCNFSM5Z4PVARQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That was just recently added and will be in the next release #322 |
That custom sleep timer value won't persist though so it would need to be entered every time it's set. |
@advplyr No worries, its not end of the world. I like Audiobookshelf so much that I don't mind waiting till sleep timer is rewritten. |
Hey, I saw the dev-chat in discord and thought of sharing some screens from Smart Audiobook Player to give you a little bit of idea how it deals with sleep timer. When you short press the sleep timer icon you get to set up the schedule when it's active and when you hold the button it let's you select the specific time. You don't have to go to settings to set it up, although you can. |
+1 for this, Smart Audiobook Player implementation is best so far. Current timer has two issues for me:
|
I've sent email to the SAP developer with link to ABS api with request to implement support for ABS and he said that he'll think about it. That way we'd have best of both worlds, because lest be honest SAP is hands down the best android Audiobook player out there. Might be worth for other people sending him an email as well. |
@mefistos SAP is good, but the native app is almost there. Not sure if SAP dev integrating audiobookshelf API would be a gamechanger for me at this stage, as I doubt it'll be fully integrated with series, progress sync, etc. If he does go ahead with it, it'll be most likely just the browse, stream and download locally functions. |
I came here annoyed of forgetting to put a sleep timer before I sleep. I usually listen to books before sleeping and have forgotten to put a sleep timer, waking up to drained battery and a random position in the book. As the thread said, it would be great to just auto enable sleep timer during certain hours (as set by user) for the preferred countdown time (also customisable). I used maBook to listen AB before ABS and here is a screenshot of "Settings>Sleep timer" page in the app just for reference. What it does is, when I press play during the set hours, it turns on the sleep timer for me. Thank you for all the effort you have put into this so far. |
Throwing in my $0.02 There are really two 'features' that Smart Audiobook Player maintains and keeps it as my primary listening app:
Thank you for your continued effort into all things Audiobookshelf! |
Great comments so far, and I hope this gets implemented. Another 'feature' Smart Audiobook player has, is that it will reset the sleep timer when you pause/play. It's great when the phone is on the nightstand and you are using an bluetooth headset or similar to listen. I also feel that the 'shake to reset' in Audiobookshelf is a bit unsensitive, maybe there could be som more options in the settings were we can tweak the sensitivity. |
I've added
in PlayerNotificationService.kt to implement "reset timer on play" functionality. Obviously I had to change sleepTimerRunning and sleepTimerLength in SleepTimerManager.kt to public so I could access those variables. I'm sure there is a correct way to do this, but I'm a rebel and really needed this functionality=) |
Man it's nice to find a thread of likeminded people 😂 I've been using SAP for quite a while now and absolutely love how the sleep timer is set up, I'd really like to see a couple of those key features implemented in ABS. Just to clarify, I use a single bluetooth earbud to listen to books before I go to sleep and it has a button on the side I can tap to pause. The SAP features I particularly like are:
Essentially what I do each night is set my timer for 5 minutes and listen to a book while I fall asleep. Usually I'll tap the earbud 2 or 3 times over the course of 20 minutes or so before finally falling asleep. In the morning I only have to rewind 5 minutes to make sure I didn't miss anything 😃 |
I think I covered most of these for the next update. These are only for Android right now but the same logic would apply when implemented on iOS. Here are the updates:
|
…of current chapter ending when reset #260
@advplyr Thanks, You are the best!!!! 2 minor issues with timer reset.
|
Sounds like some good updates there, and obviously my comment in #320 (comment) should have been here. One thing not mentioned that I would like to see is an option for a zero fade-out. In other words, don't fade, just pause at the end of the timer or chapter. |
@Strider27 If you set the sensitivity to Very High then just moving the device at all should trigger the reset. If you use Very Low then you will need to give the device a good shake |
Thanks, I'm stupid haha, for whichever reason assumed it was the other way around. Any way to turn off vibration every time it is reset? |
Added in v0.9.61-beta for Android. Will leave this open until implemented on iOS |
@advplyr I have the v0.9.61-beta but it still vibrates like crazy when reset, have haptic feedback off in settings. Am I missing something? |
Haptic feedback is for the user interface interaction. I will add a separate setting for controlling the sleep timer feedback. |
Thanks a lot for all the effort. It's close to what I like (also a SABP user here).
|
Is your feature request related to a problem? Please describe.
I sometimes forget to enable the sleep timer before falling asleep. It can be difficult to find the right place to rewind to after this happens.
Describe the solution you'd like
A setting to automatically activate the sleep timer during certain hours would help avoid these runaway listening sessions.
Describe alternatives you've considered
The play/pause history feature discussed in other issues could help solve this pain point in a different way.
Additional context
At least one other audiobook app supports this (Listen Audiobook Player on Android).
The text was updated successfully, but these errors were encountered: