mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 22:39:28 +00:00
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:
@@ -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 />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user