fix
This commit is contained in:
parent
51bc52118d
commit
5a90495561
|
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
"csp": "default-src 'self'; img-src 'self' asset: data: http://asset.localhost; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self' ipc: http://ipc.localhost",
|
"csp": "default-src 'self'; img-src 'self' asset: data: http://asset.localhost; media-src 'self' asset: http://asset.localhost; video-src 'self' asset: http://asset.localhost; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self' ipc: http://ipc.localhost",
|
||||||
"assetProtocol": {
|
"assetProtocol": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"scope": [
|
"scope": [
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||||
// 尝试多种方法加载视频
|
// 尝试多种方法加载视频
|
||||||
const tryLoadVideo = async (path: string) => {
|
const tryLoadVideo = async (path: string) => {
|
||||||
// 根据路径类型选择不同的加载策略
|
// 根据路径类型选择不同的加载策略
|
||||||
const src = convertFileSrc(path, 'file')
|
const src = convertFileSrc(path)
|
||||||
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