Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage MediaPlayer.framework #9

Open
spotlightishere opened this issue May 7, 2023 · 0 comments
Open

Leverage MediaPlayer.framework #9

spotlightishere opened this issue May 7, 2023 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@spotlightishere
Copy link
Owner

spotlightishere commented May 7, 2023

MediaPlayer.framework (part of MusicKit.framework, providing similar functionality) has the ability to query the system player via MPSystemMusicPlayerController's systemMusicPlayer.

Unfortunately, its available is limited to Mac Catalyst applications. This leaves several questions regarding design: It is rather unstable. For example, querying was broken throughout the entirety of the Big Sur and Monterey release cycles, only being more dependable within macOS Ventura 13.4. Is this worth the effort?

A rudimentary attempt at this proved to be rather difficult, as there was no immediately easy way to make a Catalyst application not present UI. Perhaps it would make sense to migrate Catalyst functionality to a custom XPC service (doable, even if creating a listener isn't available as a public API.) Alternatively, it could be worth investigating whether MediaPlayer.framework has a way to query the current track as a private API underneath the macOS SDK - they appear to be very identical.

Regardless, we should likely retain our current NSNotification/AppleScript-oriented effort as a fallback. (Perhaps macOS 14.0 will be more kind...)

@spotlightishere spotlightishere added the help wanted Extra attention is needed label May 7, 2023
@spotlightishere spotlightishere self-assigned this May 7, 2023
MCMi460 added a commit to MCMi460/Ongaku-SpotlightsVersion that referenced this issue Jul 17, 2024
Awaiting a behind-the-scenes rework (see spotlightishere#9). Currently inoperable. Do not merge in current state.
Also requires spotlightishere/SwordRPC#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant