mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
add MPRIS volume handler (#1415)
This commit is contained in:
@@ -43,11 +43,16 @@ export const useMPRIS = () => {
|
||||
player.toggleShuffle();
|
||||
});
|
||||
|
||||
mpris?.requestVolume((_e: unknown, data: { volume: number }) => {
|
||||
player.setVolume(data.volume);
|
||||
});
|
||||
|
||||
return () => {
|
||||
ipc?.removeAllListeners('mpris-request-toggle-repeat');
|
||||
ipc?.removeAllListeners('mpris-request-toggle-shuffle');
|
||||
ipc?.removeAllListeners('request-position');
|
||||
ipc?.removeAllListeners('request-seek');
|
||||
ipc?.removeAllListeners('request-volume');
|
||||
};
|
||||
}, [player]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user