fix: 修复视频播放器文件路径处理问题
- 使用 Tauri 的 convertFileSrc 函数正确处理本地视频文件路径 - 替换 file:// 协议为 Tauri 的 asset protocol - 解决视频预览加载失败的问题 - 确保视频播放器能正确显示本地视频文件
This commit is contained in:
parent
28c778e3ae
commit
fb173cb70c
|
|
@ -9,6 +9,7 @@ import {
|
|||
SkipForward,
|
||||
RotateCcw
|
||||
} from 'lucide-react';
|
||||
import { convertFileSrc } from '@tauri-apps/api/core';
|
||||
|
||||
import { VideoFileInfo } from '../../types/frame-extractor';
|
||||
import './VideoPlayer.css';
|
||||
|
|
@ -229,7 +230,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||
{/* 视频元素 */}
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={`file://${video.path}`}
|
||||
src={convertFileSrc(video.path)}
|
||||
className="w-full h-full object-contain"
|
||||
preload="metadata"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue