mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
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:
parent
6ad756b215
commit
486b04b70b
3 changed files with 14 additions and 3 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue