|
|
@ -13,29 +13,41 @@ current playback information. The file is JSON-formatted and located at |
|
|
|
The file contains a single JSON object with the following attributes: |
|
|
|
- **playing**: (bool) Whether or not the player is current playing. This is false when the player is closed. |
|
|
|
- **song**: (object) A song object in the format below. |
|
|
|
- **time**: (object) A time object in the format below. |
|
|
|
- **songLyrics**: (string) The full lyrics of the current song, or null if we could not find the lyrics |
|
|
|
|
|
|
|
##### Song Object |
|
|
|
All attributes are null if no song is playing. If a song is paused the variables are set correctly. |
|
|
|
All attributes are `null` if no song is playing. If a song is paused the variables are set correctly. |
|
|
|
- **title**: (string) Title of the song |
|
|
|
- **artist**: (string) Artist of the song |
|
|
|
- **album**: (string) Album of the song |
|
|
|
- **albumArt**: (string) URL that points the Album Art |
|
|
|
|
|
|
|
#### Time Object |
|
|
|
All attributes are `0` of no song is playing. If a song is paused the variables are set correctly. |
|
|
|
- **current**: (number) Number of milliseconds into the song we are |
|
|
|
- **total**: (number) Total length of the song in milliseconds |
|
|
|
|
|
|
|
### Example |
|
|
|
|
|
|
|
```js |
|
|
|
// playing |
|
|
|
// Playing |
|
|
|
{ |
|
|
|
"playing": true, |
|
|
|
"song": { |
|
|
|
"title": "Shut Up and Dance", |
|
|
|
"artist": "WALK THE MOON", |
|
|
|
"album": "Talking Is Hard", |
|
|
|
"albumArt": "https://lh5.ggpht.com/ePx57Lao09SN2MGsN11s1axY9cLFj3B35D-y4HvKjkl2Qi4y6vq9bHkv3tZwXVXZmj60kkUFbA=s90-c-e100" |
|
|
|
} |
|
|
|
"title": "Trumpets", |
|
|
|
"artist": "Jason Derulo", |
|
|
|
"album": "Tattoos", |
|
|
|
"albumArt": "https://lh6.ggpht.com/J9gNObbLJ_R71OHy-F6ENINYlnjf6Hjx_dw4RV0GLSTH1zrDEFSeRcW_Kf2fTws0swmOXwot=s90-c-e100" |
|
|
|
}, |
|
|
|
"time": { |
|
|
|
"current": 4908, |
|
|
|
"total": 217000 |
|
|
|
}, |
|
|
|
"songLyrics": "Lyrics here :)" |
|
|
|
} |
|
|
|
|
|
|
|
// Not Playing |
|
|
|
// Not Playing (Stopped) |
|
|
|
{ |
|
|
|
"playing": false, |
|
|
|
"song": { |
|
|
@ -43,6 +55,11 @@ All attributes are null if no song is playing. If a song is paused the variable |
|
|
|
"artist": null, |
|
|
|
"album": null, |
|
|
|
"albumArt": null |
|
|
|
} |
|
|
|
}, |
|
|
|
"time": { |
|
|
|
"current": 0, |
|
|
|
"total": 0 |
|
|
|
}, |
|
|
|
"songLyrics": null |
|
|
|
} |
|
|
|
``` |
|
|
|