Skip to content

🐛 Fix lock screen pause not stopping TTS playback#28

Draft
williamchong wants to merge 1 commit intolikecoin:mainfrom
williamchong:main
Draft

🐛 Fix lock screen pause not stopping TTS playback#28
williamchong wants to merge 1 commit intolikecoin:mainfrom
williamchong:main

Conversation

@williamchong
Copy link
Copy Markdown
Member

Remove custom auto-resume logic that could not distinguish lock screen pause (user intent) from OS audio interruption, causing pause from media controls to be immediately undone. expo-audio handles interruption recovery natively via AVAudioSession (iOS) and AudioFocus (Android).

Remove custom auto-resume logic that could not distinguish lock screen
pause (user intent) from OS audio interruption, causing pause from
media controls to be immediately undone. expo-audio handles interruption
recovery natively via AVAudioSession (iOS) and AudioFocus (Android).
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where pausing from lock screen media controls would be immediately undone due to custom auto-resume logic in the native audio bridge. The change aligns behavior with expo-audio’s native interruption recovery so user-initiated pauses are respected.

Changes:

  • Removed custom auto-resume retry state/timer and the “unexpected pause → auto play()” loop.
  • Simplified pause/resume/stop paths by removing userPaused and auto-resume reset logic.
  • Added an in-code note documenting why auto-resume logic should not be reintroduced in the status listener.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants