From e8ee3eb7323ee0c61d967db7dee9e7ae09614154 Mon Sep 17 00:00:00 2001 From: "Kevin B." Date: Mon, 23 Nov 2026 20:28:58 -0500 Subject: [PATCH] address coderabbit comments and make popupPreview work in fullscreen --- frontend/src/components/files/LyricsList.vue | 12 +++--- .../src/components/files/PopupPreview.vue | 10 ++++- .../src/components/player/AudioPlayer.vue | 33 +++++++++++---- .../src/components/player/VideoPlayer.vue | 12 +++--- .../__tests__/AudioPlayer.fileSwap.test.ts | 1 + .../__tests__/VideoPlayer.fileSwap.test.ts | 1 + frontend/src/components/prompts/Prompts.vue | 42 ++++++++++++++++++- .../composables/player/settingsElements.ts | 6 +++ .../composables/player/useDoubleTapSeek.ts | 3 ++ .../composables/player/useFullscreenState.ts | 21 ++++++---- .../composables/player/useMediaKeyboard.ts | 3 +- .../src/composables/player/useMediaPlayer.ts | 4 +- .../player/useSwipeNavigationGestures.ts | 5 ++- .../player/useTranscodePlayback.ts | 38 +++++++++++++---- .../preview/usePreviewNavigation.ts | 19 +++++++-- frontend/src/player/hlsAdapter.js | 27 ++++++++---- frontend/src/utils/lyrics.ts | 5 ++- frontend/src/views/files/MediaPlayer.vue | 19 +++++++-- .../playwright/previews/transcode-helpers.ts | 19 +++++---- 19 files changed, 211 insertions(+), 69 deletions(-) diff --git a/frontend/src/components/files/LyricsList.vue b/frontend/src/components/files/LyricsList.vue index 13ac9240e..d71823f7e 100644 --- a/frontend/src/components/files/LyricsList.vue +++ b/frontend/src/components/files/LyricsList.vue @@ -16,7 +16,7 @@

best) { + const item = items.at(i); + if (item?.untimed) continue; + const timestamp = item?.timestamp ?? Number.POSITIVE_INFINITY; + if (timestamp <= currentMs && (timestamp > best || (preferLast && timestamp === best))) { best = timestamp; idx = i; } @@ -122,7 +124,7 @@ function syncLyrics() { activeWordIndex.value = -1; } const words = first >= 0 ? lyrics.at(first)?.words : null; - activeWordIndex.value = words?.length ? findActiveIndex(words, currentMs) : -1; + activeWordIndex.value = words?.length ? findActiveIndex(words, currentMs, true) : -1; } function scrollToActiveLine() { diff --git a/frontend/src/components/files/PopupPreview.vue b/frontend/src/components/files/PopupPreview.vue index a4385dc60..4ee6d1b71 100644 --- a/frontend/src/components/files/PopupPreview.vue +++ b/frontend/src/components/files/PopupPreview.vue @@ -1,4 +1,5 @@