Add pause-while-recording across macOS, Windows, and Linux (tested on Ubuntu)#1028
Open
apotenza92 wants to merge 7 commits intocjpais:mainfrom
Open
Add pause-while-recording across macOS, Windows, and Linux (tested on Ubuntu)#1028apotenza92 wants to merge 7 commits intocjpais:mainfrom
apotenza92 wants to merge 7 commits intocjpais:mainfrom
Conversation
Owner
|
this does not compile on macos x86 https://github.com/cjpais/Handy/actions/runs/23041353318/job/66920158212 |
Author
|
Reproduced locally on macOS x86_64 target and pushed fix. Issue was MediaRemote bridge being compiled for the host arch instead of the target arch |
🧪 Test Build ReadyBuild artifacts for PR #1028 are available for testing. Download artifacts from workflow run Artifacts expire after 30 days. |
The `any_application_is_playing()` guard in `platform_resume_playback` was causing media to never resume. After sending the MediaRemote pause command, the OS does not immediately update its now-playing state, so the check would always see the paused app as still "playing" and bail out before calling `play()`. Since we already know something was playing (we paused it ourselves and stored that in `paused_playback`), the guard is unnecessary — remove it. Also handle the race where `resume_after_recording` is called before the MediaRemote pause backend call returns: store the resume intent in `stale_resume_play` so the pause thread can resume immediately once its result arrives, preventing media from getting stuck paused. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b4e21a3 to
876e23b
Compare
Author
|
I pushed a cleanup / update based on some issues that came up during my own local testing:
Re-tested locally on macOS:
|
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.
Before Submitting This PR
If this is a feature or change that was previously closed/rejected:
Human Written Description
I originally opened #998 after having an issue on macOS where mute while recording wasn't working correctly with my hardware setup (USB audio interface), so I decided to just try making pause while recording as an additional option that I prefer.
Related Issues/Discussions
Fixes #998
Related to #192
This revisits the older pause/resume media request from #192, but the scope here is intentionally framed as a bug-fix / hardening pass rather than a net-new feature pitch. This PR makes pause-while-recording behave consistently across macOS, Windows, and Linux, improves lifecycle safety, and aligns the settings/UI/backend behavior.
Community Feedback
The original motivation came from #998. I did not open a separate Discussion thread for this change, but I manually built and tested the resulting behavior on macOS, Windows, and Ubuntu to verify the feature works across all three supported desktop platforms. I primarily run macOS but used Parallels to test in Windows and Ubuntu VMs.
Testing
Automated / local checks
cargo test --manifest-path src-tauri/Cargo.toml media_control -- --nocapturebun run buildbun run format:checkbun run lintManual cross-platform validation
Handy.appand DMG locallyhandy.exehandyWhat changed
Notes
cargo clippy --all-targets --all-features -- -D warningsstill reports existing repo-wide warnings unrelated to this PR, so I did not fold a broad clippy cleanup into this changeScreenshots/Videos (if applicable)
None for now.
AI Assistance
If AI was used: