fix: don't create play pause method unneccessarily

This commit is contained in:
Manish
2021-10-14 10:16:36 +05:30
parent a76f12c01c
commit 81fb5118aa
2 changed files with 17 additions and 32 deletions

View File

@ -15,22 +15,4 @@ 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();
});
};