This is close enough to my solution, just using the playback state instead of a boolean variable. I discovered that when I upgraded to Monterey this month my MPMusicPlayerControllerNowPlayingItemDidChange notification began giving me the same treatment: work once and done, leading to yet another code around. I posted about it here around the time I came across this post. If you have the same problem, please drop a comment about any ideas you might have as well!
Topic:
Media Technologies
SubTopic:
General
Tags: