fix: video preview

This commit is contained in:
DIYgod 2024-09-08 22:35:03 +08:00
parent 2bd5b45e6b
commit e38820c1aa
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ const VideoPreview: FC<{
const [isInitVideoPlayer, setIsInitVideoPlayer] = useState(!previewImageUrl)
const [videoRef, setVideoRef] = useState<VideoPlayerRef | null>(null)
const isPaused = videoRef?.getState().paused
const isPaused = videoRef ? videoRef?.getState().paused : true
const [forceUpdate] = useForceUpdate()
return (
<div
@ -274,7 +274,7 @@ const VideoPreview: FC<{
nextFrame(forceUpdate)
}}
>
{isInitVideoPlayer ? (
{!isInitVideoPlayer ? (
<img
src={previewImageUrl}
className="size-full object-cover"