Skip to content

Add Netease Music auto-pause support with direct AXPress menu control#853

Open
Zhivago-Sizov wants to merge 3 commits intokyleneideck:masterfrom
Zhivago-Sizov:netease-support
Open

Add Netease Music auto-pause support with direct AXPress menu control#853
Zhivago-Sizov wants to merge 3 commits intokyleneideck:masterfrom
Zhivago-Sizov:netease-support

Conversation

@Zhivago-Sizov
Copy link
Copy Markdown

@Zhivago-Sizov Zhivago-Sizov commented Apr 12, 2026

Closes #184

Summary

  • add auto-pause support for Netease Music
  • control Netease Music playback through its Controls menu using macOS accessibility APIs
  • use direct AXPress on the target menu item first, with the existing System Events menu-click path kept as a fallback
  • document the fallback behavior and local testing workflow

Context

Issue #184 requested support for Netease Cloud Music.

This change adds Netease Music to the supported auto-pause players list. The implementation inspects the app's Controls menu and toggles playback through accessibility menu items. To avoid briefly revealing the menu during auto-pause, it first tries to invoke the target AXMenuItem directly with AXPress. If direct accessibility control fails, it falls back to the previous UI scripting approach.

Verification

  • xcodebuild -project BGMApp/BGMApp.xcodeproj -scheme 'Background Music' -configuration Debug -quiet build
  • manually verified Netease Music playback state can be toggled through direct accessibility menu item actions
  • verified the fallback path remains available if direct accessibility control cannot be used

Notes

  • I intentionally did not add a copyright notice to the modified files. Happy to add one if you want it included.

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.

Netease Cloud Music support

1 participant