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

@ -566,7 +566,7 @@ export default {
},
setLyricsInterval() {
this.lyricsInterval = setInterval(() => {
const progress = this.player.seek() ?? 0;
const progress = this.player.seek(null, false) ?? 0;
let oldHighlightLyricIndex = this.highlightLyricIndex;
this.highlightLyricIndex = this.lyric.findIndex((l, index) => {
const nextLyric = this.lyric[index + 1];