How notch apps read what is playing, after macOS 15.4
Showing the song that is playing sounds trivial. On macOS it is not, and in version 15.4 it got harder. This guide explains why, based on what we tested while building NotchStar.
The two ways to ask
There are two routes to the current track:
- Ask the app. AppleScript lets you query Music or Spotify directly for the track name. It is a supported, public approach, but only works for apps that expose scripting and gives limited detail.
- Ask the system. macOS has a private service behind the Control Center Now Playing tile. It knows about any app that reports media, and it carries artwork and elapsed time.
Notch apps want the second route, because it works for browsers and other players too.
What changed in 15.4
The private framework behind the system route is called MediaRemote. From macOS 15.4, a normal third party process that tries to read it gets nothing back. We confirmed this: calling it from a plain program timed out with no data.
The workaround
An open source project, MediaRemoteAdapter, uses a quirk. Apple’s own /usr/bin/perl is still allowed to use that framework. The adapter loads a small helper library into that Apple signed process, which then prints the Now Playing state as JSON. The app reads that output.
On our test Mac it returned the right title, artist, album and a 600 by 600 pixel cover for a streaming track, and pushed updates as soon as playback changed.
The catches
- It is a private interface. Apple can restrict it again at any time. That also generally rules out the Mac App Store.
- Not every track has timing. Some Apple Music items, such as radio style playback, carry no duration or elapsed time at all. We tested a timestamp based guess and it was wrong, because the timestamp moves when you pause. So NotchStar shows a progress bar only when the player really provides one.
- Scripting can lie. For streaming tracks, AppleScript returned the same album cover for different songs in our tests. Artwork from the system route was correct.
What NotchStar does
It uses the system route by default and listens only while its card is on screen. If that route goes quiet or fails, it falls back to AppleScript for Music and Spotify. Read the Now Playing details. The adapter is the open source MediaRemoteAdapter project, and we credit it in the app.