fix: 修复
This commit is contained in:
parent
4aff866e3f
commit
e39a10e5d3
|
|
@ -24,7 +24,7 @@ async function testPath() {
|
||||||
const filePath = await path.join(appDataDirPath, 'assets/video.mp4');
|
const filePath = await path.join(appDataDirPath, 'assets/video.mp4');
|
||||||
const assetUrl = convertFileSrc(filePath);
|
const assetUrl = convertFileSrc(filePath);
|
||||||
const path2 = `C:\\Users\\imeep\\.mixvideo\\temp\\video_storage\\0af48d09-7b7f-4453-84e6-e7b2b33f7726.mp4`
|
const path2 = `C:\\Users\\imeep\\.mixvideo\\temp\\video_storage\\0af48d09-7b7f-4453-84e6-e7b2b33f7726.mp4`
|
||||||
const assetUrl2 = convertFileSrc(path2);
|
const assetUrl2 = convertFileSrc(path2, 'file');
|
||||||
|
|
||||||
console.log({ filePath, assetUrl, assetUrl2, path2 })
|
console.log({ filePath, assetUrl, assetUrl2, path2 })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||||
// 尝试多种方法加载视频
|
// 尝试多种方法加载视频
|
||||||
const tryLoadVideo = async (path: string) => {
|
const tryLoadVideo = async (path: string) => {
|
||||||
// 根据路径类型选择不同的加载策略
|
// 根据路径类型选择不同的加载策略
|
||||||
const videoPath = path.split('\\').filter(it => it.length > 0).join('/')
|
const src = convertFileSrc(path, 'file')
|
||||||
console.log(`try load video videoPath`, {videoPath, path})
|
|
||||||
const src = convertFileSrc(videoPath)
|
|
||||||
console.log(`try load video src`, src)
|
console.log(`try load video src`, src)
|
||||||
setVideoSrc(src)
|
setVideoSrc(src)
|
||||||
setLoadingMethod('convertFileSrc')
|
setLoadingMethod('convertFileSrc')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue