【发布时间】:2021-02-07 04:51:21
【问题描述】:
我正在尝试在 html5 视频上播放本地录制的视频 但每次我尝试我都会得到
加载资源失败:服务器响应状态为 404(OK) 这是我给视频标签的网址 http://localhost:8080/storage/emulated/0/DCIM/Camera/VID20201024134007.mp4
这里是代码
let testUrl = this.videoService.localFileUrl.fullPath;
testUrl = testUrl.replace('file:///', 'http://localhost:8080/');
console.log("filePath=======>", testUrl)
this.filePath = testUrl;
【问题讨论】:
-
路径似乎在设备的存储卡上。该应用是否有权从该位置读取文件?
-
是的,我在 android manifest 文件中添加了后写权限,并在 didEnter 生命周期中请求了存储权限
-
您找到解决方案了吗?我也有同样的问题...
标签: angular ionic-framework ionic3 ionic4