Maybe it’s because you’re a command line lover and you previously did a trick to fix Sierra which responded only on iTunes?
Here’s the responsible.
$ launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
By doing this command, you’ve just disabled the service which handles the media keys.
It was a good idea on Sierra because Spotify was able to get actions from the media keys.
But now that you’re now on High Sierra (where Apple changed some stuff), not having this service working makes media keys like ghost.
The solution is to enable again the service via:
$ launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
However, on High Sierra, media keys handle the latest audio application started (like vlc, firefox, chrome, safari, itunes, etc) which can be annoying at some point.
To fix that, you can use a software which allows you to specify the application you want to control via media keys, called High Sierra Media Key Enabler.