I'm on Windows 10. Normally, my media keys on my keyboard (e.g. play, pause, skip) control spotify just fine. But while I have Chrome open, these media keys do nothing to control spotify. When I press them, nothing happens. I've researched this issue and I've seen many answers similar to this:
Try clearing your browsing data (cookies, etc). I was having the same issue which persisted after disabling hardware media key handling. The problem started after I installed the YouTube Music Chrome app and continued even after I uninstalled it, until I thought to clear my cache and stuff. Working fine now! Hope this helps.