use am lyrics as def, fix airplay lyrics delay
This commit is contained in:
parent
c876369b88
commit
db285b8a8a
3 changed files with 15 additions and 14 deletions
|
@ -120,10 +120,10 @@
|
|||
if (startTime != 9999999) this.app.seekTo(startTime, false);
|
||||
},
|
||||
getActiveLyric() {
|
||||
const delayfix = 0.1
|
||||
const delayfix = app.activeCasts[0]?.hasOwnProperty('airplay2') ? -2.5 : 0.1
|
||||
const prevLine = app.currentLyricsLine;
|
||||
for (var i = 0; i < this.lyrics.length; i++) {
|
||||
if (this.time + delayfix >= this.lyrics[i].startTime && this.time + delayfix <= app.lyrics[i].endTime) {
|
||||
if ((this.time + delayfix >= this.lyrics[i].startTime) && (this.time + delayfix <= app.lyrics[i].endTime)) {
|
||||
if (app.currentLyricsLine != i) {
|
||||
app.currentLyricsLine = i;
|
||||
if (((app.lyricon && app.drawer.open) || app.appMode == 'fullscreen') && this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`)) {
|
||||
|
@ -172,7 +172,7 @@
|
|||
} catch (e) {
|
||||
}
|
||||
for (child of this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${app.currentLyricsLine}"]`).querySelectorAll(".verse")) {
|
||||
if (this.time + 0.1 >= child.getAttribute("lyricstart") * 1 + child.getAttribute("versestart") * 1) {
|
||||
if (this.time + delayfix >= child.getAttribute("lyricstart") * 1 + child.getAttribute("versestart") * 1) {
|
||||
child.classList.add("verse-active");
|
||||
} else {
|
||||
child.classList.remove("verse-active");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue