mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-17 21:22:05 +00:00
Split providers in 2
This commit is contained in:
18
providers/song-controls.js
Normal file
18
providers/song-controls.js
Normal file
@ -0,0 +1,18 @@
|
||||
// This is used for to control the songs
|
||||
const pressKey = (window, key) => {
|
||||
window.webContents.sendInputEvent({
|
||||
type: "keydown",
|
||||
keyCode: key,
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = (win) => {
|
||||
return {
|
||||
previous: () => pressKey(win, "k"),
|
||||
next: () => pressKey(win, "j"),
|
||||
playPause: () => pressKey(win, "space"),
|
||||
like: () => pressKey(win, "_"),
|
||||
dislike: () => pressKey(win, "+"),
|
||||
search: () => pressKey(win, "/"),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user