mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
19 lines
435 B
JavaScript
19 lines
435 B
JavaScript
const { ipcRenderer } = require("electron");
|
|
|
|
let videoStream;
|
|
module.exports = () => {
|
|
videoStream = document.querySelector(".video-stream");
|
|
|
|
ipcRenderer.on("playPause", () => {
|
|
if (!videoStream) {
|
|
videoStream = document.querySelector(".video-stream");
|
|
}
|
|
|
|
if (videoStream.paused) {
|
|
videoStream.play();
|
|
} else {
|
|
videoStream.yns_pause();
|
|
}
|
|
});
|
|
};
|