如何解决无法在Ionic 5中播放本地视频
我正在尝试在html5视频上播放本地录制的视频 但是每次我尝试时都会得到
无法加载资源:服务器的响应状态为404(确定) 这是我给视频标签的网址 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;
解决方法
此问题是由以下代码行引起的:
import sys
sys.path.insert(1,'path_to_present_directory/Folder_1'
如果要访问的文件存储在服务器上,则使用 localhost。由于此文件存储在设备上,因此需要文件路径。您可以使用问题所附图片中指定的testUrl = testUrl.replace('file:///','http://localhost:8080/');
或fullpath
下的路径。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。