


Web sockets are a good candidate for this. A more future-proof solution could be based on a proxy service that gets requests from the web page and updates your application, and viceversa. It's worth noting that there is an increase concern by browser vendors about this mechanism (see ) and it will stop working at some point in the future. As you see, there is a way to communicate a web site and a local application. This process acts as a local server and receives requests from to interact with the current playback.

When you install Spotify's desktop application, a process called SpotifyWebHelper runs in the background. The mechanism is described on How does the Spotify web browser button interact with the Spotify app?.
