mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 20:01:47 +00:00
fix: don't create play pause method unneccessarily
This commit is contained in:
@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user