Merge pull request #114 from shumaiOne/fix/video-player-carousel-change

fix(webui): reload video player and reset state when switching assets
This commit is contained in:
Yiling-J
2026-06-16 09:35:23 +08:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
@@ -301,6 +301,7 @@ export function FileViewer({
)}
{isVideo && (
<VideoPlayer
key={file.id}
data={file}
playerRef={videoRef}
onPlay={onPlay}
@@ -256,6 +256,12 @@ function FileViewPage() {
}
}, [parentFolderId, activeFileId, carouselState.folderId])
useEffect(() => {
setCurrentTime(0)
setSelectedCommentId(null)
setAnnotations([])
}, [fileData?.id])
if (isLoading && !fileData) {
return <FileDetailSkeleton />
}