Skip to content

feat(web): add sleep timer with presets and end of song option - #1462

Open
aaditya079 wants to merge 1 commit into
kushagrasinghx:mainfrom
aaditya079:feat/web-sleep-timer
Open

aaditya079 wants to merge 1 commit into
kushagrasinghx:mainfrom
aaditya079:feat/web-sleep-timer

Conversation

@aaditya079

Copy link
Copy Markdown

Summary

Brings Sleep Timer feature parity from the Android and Android TV apps (\SleepTimer.kt) to the BitChord Web player.

Features

  • Duration Presets: 15, 30, 45, and 60 minutes.
  • End of Song: Pause playback when the current track naturally finishes playing.
  • Playback Options Menu Integration: Added cleanly into \UpNext.tsx's options menu (\MoreHorizontal), matching Apple Music's design language.
  • Live Countdown Tooltip: Displays the remaining sleep duration in the button tooltip (e.g. \Playback options (Sleep in 24m)) and menu items.
  • Unit Tests: Full test suite in \sleepTimer.test.ts\ covering timer initialization, presets, timeout triggers, \�fterTrack\ interception, and duration formatting.

Verification

  • \pnpm test\ (166/166 passing)
  • \pnpm typecheck\ (0 errors)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant