mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
feat: add play and pause seperate song controller.
This commit is contained in:
@ -15,4 +15,22 @@ module.exports = () => {
|
||||
videoStream.pause();
|
||||
}
|
||||
});
|
||||
|
||||
ipcRenderer.on("play", () => {
|
||||
if (!videoStream) {
|
||||
videoStream = document.querySelector(".video-stream");
|
||||
}
|
||||
|
||||
if (videoStream.paused) videoStream.play();
|
||||
});
|
||||
|
||||
ipcRenderer.on("pause", () => {
|
||||
if (!videoStream) {
|
||||
videoStream = document.querySelector(".video-stream");
|
||||
}
|
||||
|
||||
videoStream.yns_pause ?
|
||||
videoStream.yns_pause() :
|
||||
videoStream.pause();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user