> The app does absolutely no work in the background. It works by simply existing as a running process, thanks to having the same bundle identifier as the Music app.
I love clever, low-or-no-code engineering solutions like this. You typically need to understand a systems very deeply to reach this level of elegance. In this case, one has to understand exactly what happens when the play button is pressed in Mac OS, how bundle identifiers work, etc. And the outcome is an app with almost no code at all – just a collision – it's beautiful.
(As an aside, coding agents are terrible at this kind of thing; I'd guess Codex as of right now would write some overpowered application that polls in a loop looking for Music App starts and killing them)
On the contrary, this feels like a great (hypothetical) example of how to use coding agents effectively.
> Codex as of right now would write some overpowered application that polls in a loop looking for Music App starts and killing them
Most human engineers would also do this. It's a relative rarity to find someone writing things this elegantly.
Similarly, if you asked an agent to "Stop the Apple Music app from launching", it would likely try to do what most humans would do. Otoh if you asked an agent to explain why the Apple Music app launches, based on the discoveries it presents to you from its investigation you would quickly discover for yourself that asking it to make a zero code app that collides with Music is the best course of action.
Absolutely. Coding agents as a research companion to the curious are phenomenal, but they also amplify all the worst tendencies of "when all you have is a hammer".
This is true. Outcomes correlate with the quality and depth of the conversation. The quality and depth correlates with the users understanding of computers
Reminds me that when I was in high school, my father used to regulate my gaming sessions with Apple ScreenTime. I changed the BundleIdentifier in my game's info.plist to `com.apple.systempreferences` and sign the .app with my own developer cert to bypass this. Was a lot of fun before got caught physically.
I still can't believe they killed iTunes. I used to have my entire digital music library in iTunes. Most of that was music I had ripped myself from CD, but I had a handful of albums I bought of iTunes and even some TV shows. When they wholesale abandoned iTunes and deleted from Mac OS in favor of...whatever Apple Music is, I knew I'd never trust them again.
I searched for some decent mp3 players for a while, and even used AIMP for a while, but nowadays I think I'll just vibe code my own with my own interface and rely on the local file system and folder mounts to do the job. I really love this new era where I can just use AI to build a custom thing for myself and forget about all the predatory crap out there, especially from the OS vendors. I don't need streaming, I don't want it. I would have kept buying albums off iTunes, but since it sucks so much I'll just buy it on CD, thanks.
You can turn off the cloud service in Apple Music and still use it with your local tracks and music downloaded from the iTunes Music Store (which still exists).
I did this for most of last year. I had all local music in Apple Music, disabled the cloud stuff, and synced it all to my iPhone by plugging it in with a cable, as if it was an old iPod. It all still worked.
Yep, I've been importing CDs to Apple Music (which I buy from my local music store) and adding them to my Android phone for personal listening. It's a great way to spend money on music in a way that supports local businesses!
That's the difference? I still use the Music app and it still behaves exactly as it did before they renamed it. I do not subscrbe to Apple Music. I still have my entire digital music libray in iTunes/Music and it functions as it always did.
I had an OO perl replacement for iTunes back in the day (to learn OO perl, mostly). It had a web frontend, and also handled ripping and cd metadata with “insert disk, up arrow enter”. It failed to eject the disk iff there was a problem with the rip / transcode / metadata. I had 3-4 CDROMs in a desktop for parallelism.
Maybe I should have an LLM port to rust. It was under a thousand lines of code.
iTunes and iPhoto both. Given how good the tools are getting, and how much existing sample code is available, it seems likely someone will do a good job of reincarnating them in the near future. Apple broke the apps I used most on the Mac and then they added the bubblicious design crime UI, no thanks.
I found a WinAmp clone, written in Swift and AppKit, in the App Store yesterday. It was a month old, and from the description (ex. "No Electron, no bloat." and "No telemetry, no tracking, no accounts") it was almost certainly vibe coded. All the things it was saying were things I like, but written in a very AI way.
It is basically old iTunes with some UI improvements and modern features built around somebody who has their own library to manage.
Been around for a long time.
It’s great software that I’m willing to pay for in today’s world for sure.
The specification would matter more than the source it produces. Specify it right and share it with the world. Code is basically a winamp skin on the OS level.
It's mostly that I want my own list management, key combinations, navigation, etc. Once the entire UI is my oyster, I realized I don't have to settle for how someone else decided to lay out the menus, etc. 25 years ago I would just learn all the key combos and be set, but 12 major iterations later, few to zero of those UI skills and muscle memory state has survived. So now, I can do my own and no one can take it away from me :)
It's very sad to see Apple using these lowbrow Microsoft tactics. Press ganging your users into launching your other shit product is brand cannibalism.
I don't use Apple Music, so opening their music player only wastes my attention and time. It happens if you accidentally press play on your headphones too. Then you need to quit Apple Music, for no good reason. And you can't uninstall it!
Are you talking about the pixel buds app? They ask you on setup if you want it installed, and you can uninstall it anytime. Seems pretty far from "mandatory".
Yeah, right? Seems obvious to me. If I press "Backspace" and there is nothing to go back to, or to remove, I expect the key to do nothing. Same for Escape, or Volume Up, or whatever. If it can't do what's expected, it does nothing.
Feels like at one point all the people who spent decades building OSes and desktop environment left Apple and Microsoft, and the people left are brand new developers who only been using computers for the last 10 years or something. Or something something executives/management, whatever fits your worldview better.
Because this OS developer is also trying to sell you their Music service subscription. I'm sure having this setting would hurt some of their internal KPIs and therefore would never be implemented.
It doesn’t, it opens Apple Music. Apple has a longstanding problem with giving their own apps privileged roles that they don’t expose to competitors. What concessions exist in browsers, maps, and music player are all the result of being forced into it by various lawsuits. Let’s not play games about what’s going on here.
I'd be fine with it doing that if it actually opened what i listen with. The OS can clearly see i spend 100% of my time in another music player (Spotify), opening Apple Music is at best a poorly designed UX.
But why isn't there an easy option to turn the "feature" off? Why the kluges and workarounds for Apple going downhill (Microsoftean is indeed a good term here) for a while now? Same story for the nasty notifiction system, the annoying finder "spacebar may preview some random file hopefully without too many security vulns" (the low contrast design whereby you think Firefox is in foreground but it's actually the Finder is another bad design element that contributes to mixing up what the active app is), etc etc etc
2. You are listening to a podcast or song on your iPhone using your AirPods.
3. You press your AirPods stem to pause the podcast or song on your iPhone.
4. You press your AirPods again, expecting to continue the podcast or song on your iPhone.
5. Your AirPods are now connected to your Mac, which is opening Apple Music. This takes a long time to complete.
Note that you can not remove the Music app from MacOS without serious compromises to MacOS. It is a slow, awful resource hog that I personally never want to use, and it rubs me the wrong way. My impression of Apple is much lower for it.
or turn it off entirely because guess what? Most people are accidently hitting this play/pause button or they hit it thinking youtube is going to respond and instead they get Apple's seriously shite music player. classic apple no respect for me and my choices.
sometimes you can have a youtube video that is paused, and you hit play/pause button thinking it will unpause it but for whatever reason that video seems to not be registering as being unpausable so OSX thinks there is nothing to unpause, so it opens itunes, it's one of the reasons apple was cited under geneva convention violations for unusual weaponry last year
You can't uninstall Apple Music as far as I am aware, so it is not just a "music player" but a specific app, which I personally don't use. For the play button I at least see the point, but it opens it when you insert an audio CD, for example. Even Windows asks what to do in a notification.
Because this f%#n sh*t is jumping at you and is in your way promoting itself and want to configure and engage right away, or start some random item remained there when you in interim loss of your senses tried this crap, every time you press play instead of 8 or 9 by mistake, accidentally! But you don't want to start it, ever, anyway, that's why!
This question is fascinating. The reason why pressing the Play button when no media session is available should not open the music player is because there is no media session available. Why would launching Apple Music be the desired or even expected behavior?
These kind of things backfire very hard. I will never ever use Apple Music whatever products, never. Just like those drawn to this remedy like flies to sugar. They make so shitty and offensive user experience that supporting them by not avoiding the vicinity of it is a crime against humanity! Basically supporting bullying kind of behaviour.
Why not to have a simple way to turn this offensive behaviour off? Nonsense. It is intentionally offensive and forceful! Straight forceful behaviour that needs to be cut down at the sprout! Otherwise it will multiply and suffocate you down the line.
Too much of the product designers adapt this arrogant attitude, Apple is just a (sizeable) drop in the sea!
Sharing as I’ve not seen this mentioned by anyone. I have achieved something similar with Karabiner and the custom reassignment of the play button to actually run Spotify and play the last song from there rather than Apple Music and it worked like a charm.
for me it's when I open an audio file and it automatically launches it AND adds it to my music library, the adding to library is what I hate, then I have to delete it and specifically choose "Keep file"
Ah a long time ago when the Music app was still called iTunes I have configured all music files to be opened with quicktime player. It’s been so long that I forgot the default was the Music app. To me it’s absolutely clear that playing a file doesn’t mean I want it in my library.
This was annoying to me too but it is pretty easy to fix. Just right click on the .mp3 or whatever file, Get Info and change the default application to your preferred app and then click on "Change all..."
You have to do it once per file type but it's once and done.
Yes, at least in theory changing this is straight forward. Though:
>You have to do it once per file type but it's once and done.
I will note I have one Mac with one old user account where it will not remember this anymore across reboots (across macOS 15, plan to skip 26 and hope 27 is acceptable). I haven't had time to try to get into why, but it's occasionally irritating.
You can not do this on MacOS, at least on MacOS 26 on Apple Silicon without SIP disabled. I was:
- Unable to drag from the Applications drawer to Trash
- Unable to drag from the Spotlight search to Trash
- Unable to drag from Finder (in ~/Applications) to Trash
- Unable to delete (in Finder)
- Unable to delete (through rm in terminal).
This has been a bother for years across MacOS versions and I've tried variations of these, personally.
In the future, you might consider not denigrating others in this way. It is hard to save face when you are wrong. And it is hard for others to provide an avenue for you to save face while also pointing out that your statements are not true.
As a non power of Mac (only recently switched), I'll definitely try this.
My repeated attempts to remove from Dock and hide it all failed: half the time I remove my ear buds the Apple Music pops up in the middle of my screen and auto-enables itself in the Dock...
The Dock just contains a bunch of shortcuts. The app itself lives in the /Applications folder along with the rest of them that you can choose to add to your dock (by just dragging them down there and letting a spot open up for it).
I'd say having to turn off System Integrity Protection as a prerequisite to uninstalling a music player is crazy. Spoken as someone who likes MacOS and Apple Music.
The Apple Music thing bothers me and adds friction to my life every single day that I use MacOS.
We're on a tech forum where everyone here is aware (or at least can understand) how SIP is useful for the security model on MacOS. But for plenty of people with this problem, SIP is only the thing you learn can disable so you can immediately make your life a little better.
The crazy ones are Apple here, since this problem should not require disabling SIP to fix.
I needed something like this a few months ago. I use my MacBook to run my (musical) keyboard rig for live performances, and use low-latency wireless headphones for monitoring. The headphones have a transmitter dongle that plugs into my laptop, and the dongle sends a "play/pause" command if I press a button on my headphones...causing Music to launch and begin playing audio out of my default output device. It doesn't even care whether my headphone transmitter is selected as the default output device; in a complex multi-device setup, I can press a button on my headphones and it will happily play audio out of some other device.
This is problematic because if I were to accidentally hit the button in the middle of a set, and it decides to default to whatever interface is connected to the P.A. system, then now I've just started blasting some random song at full volume to everyone in the venue.
(It's not an immediate problem for me anymore because I've reworked my hardware setup such that the dongle connects through my audio interface rather than directly to my laptop, meaning my laptop no longer receives "play/pause" commands from it. There were additional reasons for this rework, but preventing this misbehavior was absolutely part of the consideration.)
It's absurd that a premium device marketed to creative professionals has unconfigurable behavior like this which is so unacceptable for a live show.
I use both Apple Music and Spotify, and normally use the former in the car because it resumes its state from the last shutdown while Spotify does not. But when I do use Spotify, Apple Music is the app that comes up the next time I start the car. Pretty annoying.
It's not even a throwback. That U2 album still shows up if I accidentally open Apple Music. I haaaaate it. I disliked U2 before any of this, but now I have absolutely sworn to never ever listen to any of their music.
Google did the same thing with Transformers 2 I think. It still shows up as Purchased for me even though I absolutely did not purchase that. Good way to ensure I never ever watch any Transformers movie!
There was a website to remove it completely from your library, it launched in 2014 and was up for many years, but is now gone.
These days you can delete the album from your library and set the Music app to not automatically download your purchases. If you want to go an extra mile, you can login to your iTunes account to view your purchases and hide it there too.
This is nice, I recently vibe coded my own media player as I mostly listen to my own digitalized audio library and all software available today sucks to cover my scenario or consumes way too much resources by my taste… but random triggering Apple Music happens so often and it’s so annoying. Good article explaining how the trick works, should be easy to self-implement without installing another 3rd party software from nowhere known source
Although it's a pretty well known source in the macOS apps community (lowtechguys.com) with source code available right on the front page (https://github.com/FuzzyIdeas/MusicDecoy) and the code does basically nothing. There's not much to be afraid of.
I have Galaxy Buds Pro and I'm using this awesome client https://github.com/timschneeb/GalaxyBudsClient to disable all touches but sometimes the client isn't running in the background and the Music app just gets in my way, so this is great!
will quit the process responsible for the madness (rcd, the "remote control daemon").
You'll have to remember to re-load this thing if you want the default behavior. Or if you encounter other unexpected situations, to restore the default insanity.
It might be easier to run this app instead; then you have an icon in your GUI desktop environment and an app you can simply quit to restore defaults. Plus this app allows you to assign any app to the "Play" media event.
Wow, thank you! I use and "like" youtube music, but it seems like every time I'd start a google meet call (IIRC) or otherwise interact with audio on my MacBook it would bring up Apple Music. If I quit it, it would pop back up the next time I had audio playing, but if I just left it running it would be fine. So I'd always have this Apple Music in my list of running apps. Kind of annoying.
I ran the above and then quit Apple Music and tried a few different things and so far it hasn't come back up.
~: sudo chmod -x /Applications/Music.app
chmod: /Applications/Music.app: No such file or directory
~: sudo chmod -x /System/Applications/Music.app
chmod: Unable to change file mode on /System/Applications/Music.app: Operation not permitted
When you first launch it, you'll notice a pop-up saying that this will automatically run when you login. There's no dock icon or menu bar icon. So no configuration changes needed.
I'm very clumsy and I've never hit the play button by accident. What are you guys doing that makes it so easy to accidentally click the play button? Are you using the mac with the touch bar or something?
- I'll pause a podcast I'm listening to on my iPhone or iPad, or just take my AirPods out of my ear for a moment
- Like 5 minutes later, I'll squeeze the AirPod stem to resume playback. It will instead think that I want to play Apple Music on my Mac for some fucking reason.
I don't think this behavior can be easily customized (somebody let me know if it can!)
Just this week I was stuck in this state where my AirPods were receiving audio from the iPhone in my pocket (intended), but play/pause commands from the AirPods were sent to my Macbook in the other room.
I had to start using noTunes years ago because whenever I accidentally touched or removed my (Sony / non-Apple) bluetooth headphones, iTunes/Music would pop up without fail. Apparently they sent a "play" button press, so the application would pop up. Because it's a system application, you cannot delete it, there's no way to override the key, there's no way to disable it. So noTunes has been running for 7 years straight on my Mac.
I use play/pause to start/stop the music on whatever I was listening to music on (Spotify usually, sometimes brain.fm). It's a background action, play music or stop music, no change to flow.
If Spotify isn't running for whatever reason, or sometimes even if it is, Apple Music decides that what I actually want is for it to steal focus for 5 seconds while it loads, switch to a full screen window and pester me to subscribe.
So in my case, the button click is intentional but the response isn't.
For me it's my AirPods launching the Music app, something I rarely want. At the same time, it's one click in the menu bar to disable noTunes in the rare circumstances I want to use the Music app.
It's made worse by the fact that I use my AirPods across my personal devices and my work Mac, the latter of which I have to switch them to manually (since my work Mac is not on my personal iCloud account).
Anyway, however it happens, I often found the Music app launching on my personal and work Macs, and noTunes prevents it.
For me it mostly happens when I press play on my airpods. If they connect to my mac instead of my phone it opens up apple music if I don't have another media player open.
I wish there was a way to stop it from ever appearing as spotlight result - when I type ‘music’, the first result (always) should be the music app I use, not their stuff
Recently I've been using a mac more, and--even with the low bar of Windows default search--I've been very disappointed with Spotlight.
For example, it keeps polluting my results with things like preinstalled system music demo files. There's no option to exclude the location, nor to selectively disable "Garageband" results while keeping other apps I actually do use for work.
The same thing happens with iPhone and car bluetooth. It is super annyoing and many times, a podcast will be playing in the background while the car has FM/radio selected. This is incredibly frustrating and bad user experience. The worst part is it is not clear if this is Apple's fault or some buggy old firmware in the car's audio stack that is at fault (this happens consistently on 2017 Tesla Model S).
I too have seen conflicts between CarPlay and the radio. My car's a Hyundai.
I mostly listen to the radio, with an occasional trip where I instead listen to a podcast or music via CarPlay.
What I've found greatly helps is when I finish a trip where I've used CarPlay after I park but before turning the car off I open my phone, open control center, tap the now playing widget, tap the symbol on that for output selection, and make sure it is set to iPhone Speaker. I then hit the Media button in the car and select FM. That starts the radio playing. Then I stop the radio and shut off the car.
Next time I use the car CarPlay connects normally but does NOT take over the media playback. If I hit the play button in the car it starts playing the radio.
This works fine for me because as I said I mostly listen to radio. It is not that big of a deal the once a week or so that I listen via CarPlay to do those extra steps at the end of a trip.
It would probably be a lot more annoying if I was frequently switching between radio and CarPlay.
In either case I would definitely like a setting somewhere that makes it so the play button in the car plays whatever source was playing the last time you turned off playback.
It seems the fans are willing to put up with absolutely unlimited grief and inconvenience to drink the koolaid they're given. Some Apple PM made a edict 11 years ago that Music shalt be thine only audio experience on the platform. Lock it down, boys!
This “Apple customers are brainwashed cultists incapable of examining reality” schtick was tired a decade ago. No option’s perfect. But Apple’s current tradeoffs vs other options’ trade offs continue to feel worthwhile to many.
I love clever, low-or-no-code engineering solutions like this. You typically need to understand a systems very deeply to reach this level of elegance. In this case, one has to understand exactly what happens when the play button is pressed in Mac OS, how bundle identifiers work, etc. And the outcome is an app with almost no code at all – just a collision – it's beautiful.
(As an aside, coding agents are terrible at this kind of thing; I'd guess Codex as of right now would write some overpowered application that polls in a loop looking for Music App starts and killing them)
> Codex as of right now would write some overpowered application that polls in a loop looking for Music App starts and killing them
Most human engineers would also do this. It's a relative rarity to find someone writing things this elegantly.
Similarly, if you asked an agent to "Stop the Apple Music app from launching", it would likely try to do what most humans would do. Otoh if you asked an agent to explain why the Apple Music app launches, based on the discoveries it presents to you from its investigation you would quickly discover for yourself that asking it to make a zero code app that collides with Music is the best course of action.
I searched for some decent mp3 players for a while, and even used AIMP for a while, but nowadays I think I'll just vibe code my own with my own interface and rely on the local file system and folder mounts to do the job. I really love this new era where I can just use AI to build a custom thing for myself and forget about all the predatory crap out there, especially from the OS vendors. I don't need streaming, I don't want it. I would have kept buying albums off iTunes, but since it sucks so much I'll just buy it on CD, thanks.
I did this for most of last year. I had all local music in Apple Music, disabled the cloud stuff, and synced it all to my iPhone by plugging it in with a cable, as if it was an old iPod. It all still worked.
Maybe I should have an LLM port to rust. It was under a thousand lines of code.
It is basically old iTunes with some UI improvements and modern features built around somebody who has their own library to manage. Been around for a long time.
It’s great software that I’m willing to pay for in today’s world for sure.
Feels like at one point all the people who spent decades building OSes and desktop environment left Apple and Microsoft, and the people left are brand new developers who only been using computers for the last 10 years or something. Or something something executives/management, whatever fits your worldview better.
I'd be fine with it doing that if it actually opened what i listen with. The OS can clearly see i spend 100% of my time in another music player (Spotify), opening Apple Music is at best a poorly designed UX.
1. You have an iPhone, a Macbook, and AirPods.
2. You are listening to a podcast or song on your iPhone using your AirPods.
3. You press your AirPods stem to pause the podcast or song on your iPhone.
4. You press your AirPods again, expecting to continue the podcast or song on your iPhone.
5. Your AirPods are now connected to your Mac, which is opening Apple Music. This takes a long time to complete.
Note that you can not remove the Music app from MacOS without serious compromises to MacOS. It is a slow, awful resource hog that I personally never want to use, and it rubs me the wrong way. My impression of Apple is much lower for it.
Why not to have a simple way to turn this offensive behaviour off? Nonsense. It is intentionally offensive and forceful! Straight forceful behaviour that needs to be cut down at the sprout! Otherwise it will multiply and suffocate you down the line.
Too much of the product designers adapt this arrogant attitude, Apple is just a (sizeable) drop in the sea!
You have to do it once per file type but it's once and done.
>You have to do it once per file type but it's once and done.
I will note I have one Mac with one old user account where it will not remember this anymore across reboots (across macOS 15, plan to skip 26 and hope 27 is acceptable). I haven't had time to try to get into why, but it's occasionally irritating.
I'm by no way an Apple fan, but why not uninstall the app if you don't need it?
Drag Music app to Trash, and that it! Like you do with any other app.
- Unable to drag from the Applications drawer to Trash
- Unable to drag from the Spotlight search to Trash
- Unable to drag from Finder (in ~/Applications) to Trash
- Unable to delete (in Finder)
- Unable to delete (through rm in terminal).
This has been a bother for years across MacOS versions and I've tried variations of these, personally.
In the future, you might consider not denigrating others in this way. It is hard to save face when you are wrong. And it is hard for others to provide an avenue for you to save face while also pointing out that your statements are not true.
Go ahead and try. It's not like "any other app".
My repeated attempts to remove from Dock and hide it all failed: half the time I remove my ear buds the Apple Music pops up in the middle of my screen and auto-enables itself in the Dock...
Of course, doing so just to get rid of Apple Music would tend to be a bit crazy.
We're on a tech forum where everyone here is aware (or at least can understand) how SIP is useful for the security model on MacOS. But for plenty of people with this problem, SIP is only the thing you learn can disable so you can immediately make your life a little better.
The crazy ones are Apple here, since this problem should not require disabling SIP to fix.
This is problematic because if I were to accidentally hit the button in the middle of a set, and it decides to default to whatever interface is connected to the P.A. system, then now I've just started blasting some random song at full volume to everyone in the venue.
(It's not an immediate problem for me anymore because I've reworked my hardware setup such that the dongle connects through my audio interface rather than directly to my laptop, meaning my laptop no longer receives "play/pause" commands from it. There were additional reasons for this rework, but preventing this misbehavior was absolutely part of the consideration.)
It's absurd that a premium device marketed to creative professionals has unconfigurable behavior like this which is so unacceptable for a live show.
Google did the same thing with Transformers 2 I think. It still shows up as Purchased for me even though I absolutely did not purchase that. Good way to ensure I never ever watch any Transformers movie!
These days you can delete the album from your library and set the Music app to not automatically download your purchases. If you want to go an extra mile, you can login to your iTunes account to view your purchases and hide it there too.
Although it's a pretty well known source in the macOS apps community (lowtechguys.com) with source code available right on the front page (https://github.com/FuzzyIdeas/MusicDecoy) and the code does basically nothing. There's not much to be afraid of.
You'll have to remember to re-load this thing if you want the default behavior. Or if you encounter other unexpected situations, to restore the default insanity.
It might be easier to run this app instead; then you have an icon in your GUI desktop environment and an app you can simply quit to restore defaults. Plus this app allows you to assign any app to the "Play" media event.
I ran the above and then quit Apple Music and tried a few different things and so far it hasn't come back up.
FTA:
Uh.. how do I quit this app?
The app has no Dock icon and no menubar icon so to quit it you'd need to do one of the following:
Launch Activity Monitor, find Music Decoy and press the button at the top
Run the following command in the Terminal:
I actually nuked my music library off my Mac to mitigate this problem, but it's still a nuisance when the app launches.
Thank you for sharing this!
I have the podcast app and so many times I would click an AirPod to resume and it would play a random song
Source code for this one: https://github.com/FuzzyIdeas/MusicDecoy
- I'll pause a podcast I'm listening to on my iPhone or iPad, or just take my AirPods out of my ear for a moment
- Like 5 minutes later, I'll squeeze the AirPod stem to resume playback. It will instead think that I want to play Apple Music on my Mac for some fucking reason.
I don't think this behavior can be easily customized (somebody let me know if it can!)
If Spotify isn't running for whatever reason, or sometimes even if it is, Apple Music decides that what I actually want is for it to steal focus for 5 seconds while it loads, switch to a full screen window and pester me to subscribe.
So in my case, the button click is intentional but the response isn't.
It's made worse by the fact that I use my AirPods across my personal devices and my work Mac, the latter of which I have to switch them to manually (since my work Mac is not on my personal iCloud account).
Anyway, however it happens, I often found the Music app launching on my personal and work Macs, and noTunes prevents it.
For example, it keeps polluting my results with things like preinstalled system music demo files. There's no option to exclude the location, nor to selectively disable "Garageband" results while keeping other apps I actually do use for work.
/s for the sarcasm impaired
I mostly listen to the radio, with an occasional trip where I instead listen to a podcast or music via CarPlay.
What I've found greatly helps is when I finish a trip where I've used CarPlay after I park but before turning the car off I open my phone, open control center, tap the now playing widget, tap the symbol on that for output selection, and make sure it is set to iPhone Speaker. I then hit the Media button in the car and select FM. That starts the radio playing. Then I stop the radio and shut off the car.
Next time I use the car CarPlay connects normally but does NOT take over the media playback. If I hit the play button in the car it starts playing the radio.
This works fine for me because as I said I mostly listen to radio. It is not that big of a deal the once a week or so that I listen via CarPlay to do those extra steps at the end of a trip.
It would probably be a lot more annoying if I was frequently switching between radio and CarPlay.
In either case I would definitely like a setting somewhere that makes it so the play button in the car plays whatever source was playing the last time you turned off playback.
The rest of us ask for a customizable experience.