Add auto-pause support for TIDAL - #863
Open
juansegnana wants to merge 1 commit into
Open
Conversation
TIDAL is an Electron app with no AppleScript dictionary or local API, so
it can't be controlled through Scripting Bridge like most of the other
players. Instead, BGMTidal drives it through the macOS Accessibility API:
it reads and presses the first item of TIDAL's localized "Playback" menu
(the play/pause toggle) directly via AXUIElement, without visibly opening
the menu. The toggle's title ("Play" vs "Pause", matched against a small
list of known localizations) also tells us whether TIDAL is playing or
paused.
This requires the user to grant Background Music the Accessibility
permission (System Settings > Privacy & Security > Accessibility). BGMTidal
prompts for it in wasSelected, i.e. only once the user actually selects
TIDAL as their music player. If the permission isn't granted, all the AX
queries fail gracefully and TIDAL is reported as not playing/paused.
juansegnana
force-pushed
the
feature/tidal-auto-pause
branch
from
July 10, 2026 03:00
af27e40 to
46a4570
Compare
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.
Adds a
BGMMusicPlayerfor TIDAL (com.tidal.desktop) so BGM can auto-pause it.TIDAL is an Electron app with no AppleScript support, so this uses the Accessibility API instead: it reads the first item of the app's "Playback" menu to detect the play/pause state, and sends
AXPressto toggle playback.Requires Accessibility permission, which is requested when TIDAL is selected as the music player.
Testing
Related issues
Closes #861, closes #262, closes #295.
Also covers the TIDAL request in #155, #356 and #359 (those issues ask for other apps too, so they aren't auto-closed here).