added /api/playback/playpause
This commit is contained in:
parent
eb505291f9
commit
f9a2954e51
2 changed files with 7 additions and 0 deletions
|
@ -153,6 +153,10 @@ export class BrowserWindow {
|
|||
app.get("/api/playback/:action", (req, res)=>{
|
||||
const action = req.params.action;
|
||||
switch(action) {
|
||||
case "playpause":
|
||||
BrowserWindow.win.webContents.executeJavaScript("wsapi.togglePlayPause()")
|
||||
res.send("Play/Pause toggle")
|
||||
break;
|
||||
case "play":
|
||||
BrowserWindow.win.webContents.executeJavaScript("MusicKit.getInstance().play()")
|
||||
res.send("Playing")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue