feat: add play and pause seperate song controller.

This commit is contained in:
Manish
2021-10-13 12:27:13 +05:30
parent 88ee0fb989
commit a76f12c01c
3 changed files with 29 additions and 6 deletions

View File

@ -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();
});
};