Skip to content

Timer change#9

Merged
chrisjm merged 2 commits intomainfrom
timer-change
Dec 13, 2025
Merged

Timer change#9
chrisjm merged 2 commits intomainfrom
timer-change

Conversation

@chrisjm
Copy link
Owner

@chrisjm chrisjm commented Dec 13, 2025

No description provided.

…timize interval detection

- Replace tick-based countdown with timestamp-based calculation for better accuracy across page visibility changes
- Add lifecycle event listeners (visibilitychange, focus, pageshow) to sync timer on page return
- Track pause duration to adjust end timestamp when resuming timer
- Change shouldPlayInterval return type from boolean to number (interval index) or null
- Add early return optimization in shoul
…anagement

- Import mobile detection utilities (getAudioUnlocked, isMobile) from mobileAudioManager
- Add isMobileDevice constant and mobile enable overlay state management
- Conditionally acquire/release wake lock only on mobile devices
- Extract core meditation start logic into startMeditationCore function
- Show modal overlay on mobile when audio not unlocked or HLS not playing
- Add handleEnableMobileAndStart to initialize audio
@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
meditation-timer Ready Ready Preview, Comment Dec 13, 2025 6:51am

@chrisjm chrisjm merged commit f654850 into main Dec 13, 2025
5 checks passed
@chrisjm chrisjm deleted the timer-change branch December 13, 2025 06:53
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