From e3eb009e822cf23149868fcb3bb9e60db2cba112 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Jul 2025 17:53:48 +0800 Subject: [PATCH] fix --- src/components/VideoPlayer.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/VideoPlayer.tsx b/src/components/VideoPlayer.tsx index ce264ae..85c31c3 100644 --- a/src/components/VideoPlayer.tsx +++ b/src/components/VideoPlayer.tsx @@ -69,7 +69,10 @@ const VideoPlayer: React.FC = ({ useEffect(() => { const video = videoRef.current if (!video) return - + const source = document.createElement('source'); + source.type = 'video/mp4'; + source.src = videoSrc; + video.appendChild(source); const handleTimeUpdate = () => setCurrentTime(video.currentTime) const handleDurationChange = () => setDuration(video.duration) const handleEnded = () => setIsPlaying(false)