Imported changes to web-remote from AME
This commit is contained in:
parent
45623f257b
commit
ab6c24f9be
11 changed files with 1265 additions and 595 deletions
|
@ -16,6 +16,14 @@ const wsapi = {
|
|||
setAutoplay(value) {
|
||||
MusicKit.getInstance().autoplayEnabled = value
|
||||
},
|
||||
returnDynamic(data, type) {
|
||||
ipcRenderer.send('wsapi-returnDynamic', JSON.stringify(data), type)
|
||||
},
|
||||
musickitApi(method, id, params) {
|
||||
MusicKit.getInstance().api[method](id, params).then((results)=>{
|
||||
ipcRenderer.send('wsapi-returnMusicKitApi', JSON.stringify(results), method)
|
||||
})
|
||||
},
|
||||
getPlaybackState () {
|
||||
ipcRenderer.send('wsapi-updatePlaybackState', MusicKitInterop.getAttributes());
|
||||
},
|
||||
|
@ -38,8 +46,8 @@ const wsapi = {
|
|||
love() {
|
||||
|
||||
},
|
||||
playTrackById(id) {
|
||||
MusicKit.getInstance().setQueue({ song: id }).then(function (queue) {
|
||||
playTrackById(id, kind = "song") {
|
||||
MusicKit.getInstance().setQueue({ [kind]: id }).then(function (queue) {
|
||||
MusicKit.getInstance().play()
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue