If you’re using Chrome and Spotify on macOS and the Play/Pause buttons on your keyboard are not working when using Spotify, there’s a simple fix for this.
Spotify Play/Pause Buttons on macOS
First, navigate to
chrome://flags/#hardware-media-key-handling in Chrome.
Next, set the option for Hardware Media Key Handling as Disabled.
Lastly, when prompted to restart Chrome, go ahead and do so and the keys should work.