Add a sleep timer#865
Open
juansegnana wants to merge 1 commit into
Open
Conversation
Add a "Sleep Timer" menu item, below the auto-pause item, with a submenu of durations (Off, 15/30/45 minutes, 1/1.5/2 hours). When the countdown ends, BGMApp pauses the selected music player and, if enabled, mutes BGMDevice's output so everything goes silent. The submenu also has a "Mute Output When Timer Ends" toggle, persisted in BGMUserDefaults (default on). The parent item's title shows the remaining time while a timer is active. The remaining time itself is not persisted across app restarts.
3709b59 to
4992c21
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a "Sleep Timer" menu with durations from 15 min to 2 h. When the timer expires, BGM pauses the selected music player and (optionally, on by default) mutes BGMDevice's output. The menu title shows the remaining time while open.
The mute-on-expiry choice persists via a new
sleepTimerMutesOutputuser default.Testing