feat(player): sync playing progress to mpris service on linux

Co-authored-by: alex3236 <45303195+alex3236@users.noreply.github.com>
This commit is contained in:
Revincx 2023-08-26 09:03:36 +08:00
parent 6ad756b215
commit 486b04b70b
No known key found for this signature in database
GPG key ID: 6E79B88F79CA3126
3 changed files with 14 additions and 3 deletions

View file

@ -44,6 +44,11 @@ export function createMpris(window) {
ipcMain.on('playerCurrentTrackTime', (e, position) => {
player.getPosition = () => position * 1000 * 1000;
player.seeked(position * 1000 * 1000);
});
ipcMain.on('seeked', (e, position) => {
player.seeked(position * 1000 * 1000);
});
ipcMain.on('switchRepeatMode', (e, mode) => {