bilibili/WebAV

Cannot read properties of undefined (reading 'getDirectory')

Closed this issue · 4 comments

你好,本地环境使用 @webav/av-cliper 都没问题,但是打包后,使用服务器地址访问地址报错了;

Uncaught (in promise) Error: TypeError: Cannot read properties of undefined (reading 'getDirectory')
{"cbId":1,"evtType":"register","args":{"filePath":"/.opfs-tools-temp-dir/846416372695203-1722258323819"}}
    at e.onmessage (av-cliper.js:109:153)

请问是缺少什么插件吗?

localhost 或者 HTTPS 环境

localhost 或者 HTTPS 环境

非常感谢,已解决。是 HTTP 协议导致的

localhost 或者 HTTPS 环境

请问为啥必须要https协议呢... 现在公司想在演示环境使用,非https。。

localhost 或者 HTTPS 环境

请问为啥必须要https协议呢... 现在公司想在演示环境使用,非https。。

https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder
image
如图所示,文章见链接,音视频处理底层需要安全的上下文环境,强制性的,如果局域网内演示可以考虑开发环境开启外网访问,开启https并使用对应插件库添加证书,具体方法自行搜索。