Google Play Music Desktop Player provides an interface for external applications to determine the currently played song and playback status.
This interface is provided through a locally hosted Web Socket. In a standard release this WebSocket is hosted on port 5672
. Any site or
application should be able to connect to ws://localhost:5672
and use the API.
All messages are sent from the Web Socket Server in the following format
{
"channel": "channel_name",
"payload": { ...data }
}
Connecting - The process for authenticating and connecting to a player
Controlling - The process for controlling the player remotely
API Version - The current version of the WebSocket API
Lyrics - The lyrics for the current song
Play State - Indicates if the player is in a paused or playing state
Playlists - The users playlists available in GPM
Queue - The users currently active song queue
Rating - The rating of the currently playing song
Repeat - The player’s current repeat mode
Search Results - The users most recent search results
Shuffle - The player’s current shuffle mode
Song - The song currently playing in GPMDP
Time - The current and total time values of the current song