mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Force quit mpv on app close (#4)
This commit is contained in:
@@ -44,7 +44,7 @@ const mpv = new MpvAPI(
|
||||
);
|
||||
|
||||
mpv.start().catch((error) => {
|
||||
console.log('error', error);
|
||||
console.log('error starting mpv', error);
|
||||
});
|
||||
|
||||
mpv.on('status', (status) => {
|
||||
@@ -152,10 +152,14 @@ ipcMain.on('player-auto-next', async (_event, data: PlayerData) => {
|
||||
|
||||
// Sets the volume to the given value (0-100)
|
||||
ipcMain.on('player-volume', async (_event, value: number) => {
|
||||
mpv.volume(value);
|
||||
await mpv.volume(value);
|
||||
});
|
||||
|
||||
// Toggles the mute status
|
||||
ipcMain.on('player-mute', async () => {
|
||||
mpv.mute();
|
||||
await mpv.mute();
|
||||
});
|
||||
|
||||
ipcMain.on('player-quit', async () => {
|
||||
await mpv.quit();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user