web remote fixes

This commit is contained in:
vapormusic 2022-01-21 09:49:45 +07:00
parent ac93ef1aee
commit a7bfac153f
2 changed files with 54 additions and 54 deletions

View file

@ -10,7 +10,7 @@ const MusicKitInterop = {
if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), true, false)) {
console.log("ayy");
global.ipcRenderer.send('playbackStateDidChange', MusicKitInterop.getAttributes())
ipcRenderer.send('wsapi-updatePlaybackState', self.getAttributes());
ipcRenderer.send('wsapi-updatePlaybackState', MusicKitInterop.getAttributes());
// if (typeof _plugins != "undefined") {
// _plugins.execute("OnPlaybackStateChanged", {Attributes: MusicKitInterop.getAttributes()})
// }
@ -19,7 +19,7 @@ const MusicKitInterop = {
/** wsapi */
MusicKit.getInstance().addEventListener(MusicKit.Events.playbackProgressDidChange, () => {
ipcRenderer.send('wsapi-updatePlaybackState', self.getAttributes());
ipcRenderer.send('wsapi-updatePlaybackState', MusicKitInterop.getAttributes());
});
/** wsapi */