Compare commits

...

35 Commits

Author SHA1 Message Date
imeepos d27ec4d634 Merge branch 'master' of ssh://gitea.bowongai.com:222/bowong/mxivideo 2025-07-11 16:53:16 +08:00
imeepos a571ea8b32 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:40:08 +08:00
imeepos c09a989de8 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:39:22 +08:00
imeepos 88380a98f0 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:36:15 +08:00
imeepos 2138324cc0 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:28:54 +08:00
imeepos f4b459ee63 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:19:16 +08:00
imeepos 05c4836919 Merge branch 'master' of ssh://gitea.bowongai.com:219/bowong/mxivideo 2025-07-11 16:16:39 +08:00
imeepos 713ab605a7 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:07:06 +08:00
imeepos 414bf603ba Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 16:00:55 +08:00
imeepos e6fa18dfe2 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:56:55 +08:00
imeepos 20733215aa Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:45:30 +08:00
imeepos c9b2f08f15 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:26:31 +08:00
imeepos 4e295be5eb Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:22:43 +08:00
imeepos 391866bcd7 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:22:00 +08:00
imeepos bcd1ff4032 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:16:47 +08:00
imeepos bc77de7b7f Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:14:59 +08:00
imeepos dc57c5e5a8 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:01:15 +08:00
imeepos 75d4ba0555 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 15:00:16 +08:00
imeepos 41d7e22175 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 14:31:20 +08:00
imeepos f6c8f26ba3 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 14:21:06 +08:00
imeepos b8a87a8f32 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 14:10:52 +08:00
imeepos 5d35aab1ab Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 13:58:28 +08:00
imeepos 39de519c88 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 13:54:39 +08:00
imeepos ac77e85f17 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 13:47:34 +08:00
imeepos caf28e765b Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 13:09:57 +08:00
imeepos 33e4939016 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 12:39:49 +08:00
imeepos c298d3c16d Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 12:33:41 +08:00
imeepos 98ee7d8d1d Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 12:31:17 +08:00
imeepos a72101ad91 Merge branch 'master' of ssh://gitea.bowongai.com:222/bowong/mxivideo 2025-07-11 12:20:34 +08:00
imeepos 28384f9f09 Merge branch 'master' of ssh://gitea.bowongai.com:219/bowong/mxivideo 2025-07-11 12:15:25 +08:00
imeepos a1d2dc0cc9 Merge branch 'master' of ssh://gitea.bowongai.com:222/bowong/mxivideo 2025-07-11 12:09:35 +08:00
imeepos 30491fc797 Merge branch 'master' of ssh://gitea.bowongai.com:220/bowong/mxivideo 2025-07-11 12:03:41 +08:00
imeepos 7306d12164 Merge branch 'master' of ssh://gitea.bowongai.com:221/bowong/mxivideo 2025-07-11 12:00:13 +08:00
imeepos a93d82084d merge 2025-07-11 11:58:41 +08:00
root 38a113097b fix 2025-07-11 11:44:52 +08:00
1 changed files with 14 additions and 3 deletions

View File

@ -25,6 +25,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
const [videoSrc, setVideoSrc] = useState<string>('')
const [fileExists, setFileExists] = useState<boolean>(true)
const [errorMessage, setErrorMessage] = useState<string>('')
const [loadingMethod, setLoadingMethod] = useState<'convertFileSrc' | 'dataUrl'>('convertFileSrc')
useEffect(() => {
const checkFileAndSetSrc = async () => {
@ -268,7 +269,16 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
<AlertCircle size={64} className="mx-auto mb-4 text-red-400" />
<h3 className="text-xl font-medium mb-2"></h3>
<p className="text-gray-300 mb-4">{errorMessage}</p>
<p className="text-sm text-gray-400">: {videoPath}</p>
<p className="text-sm text-gray-400 mb-4">: {videoPath}</p>
<p className="text-xs text-gray-500 mb-4">: {loadingMethod}</p>
{loadingMethod === 'convertFileSrc' && (
<button
onClick={tryDataUrlMethod}
className="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
>
</button>
)}
</div>
</div>
) : (
@ -277,14 +287,15 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
src={videoSrc}
className="w-full h-auto max-h-[70vh]"
onClick={handlePlayPause}
onError={(e) => {
onError={async (e) => {
console.error('Video loading error:', {
error: e,
videoSrc,
originalPath: videoPath,
currentTarget: e.currentTarget,
networkState: e.currentTarget.networkState,
readyState: e.currentTarget.readyState
readyState: e.currentTarget.readyState,
currentMethod: loadingMethod
})
// 如果当前视频源失败,尝试重新加载
if (videoPath) {