I got that same message using Spotify on my mac (after having disconnected from a speaker device). I tried to close Spotify and reopen it. That didn't work. Then, I quit Spotify and reopened it. That worked. I didn't have to restart or play the music from my phone.
Test if you couldn't play youtube videos too. I did a restart of my machine and it fixed the issue. Apparently there was a java or plug-in update my firefox kicked off. If restart doesn't work, try updating your java JRE or browser plug-ins that have some relation to music controls.