//判断本地是否有缓存视频
IsStroageVideo(name) {
// #ifdef APP-PLUS
return new Promise((res, rej) => {
plus.io.getVideoInfo({
filePath: "_downloads/yvideo/" + name,
success(data) {
console.log("已下载: ", data);
res({
status: "yes",
});
},
fail(err) {
console.log("没下载: ", err);
res({
status: "no",
});
},
});
});
// #endif
},
{
"code": 13,
"message": "Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference"
}
9***@qq.com (作者)
plus.io.convertLocalFileSystemURL("_downloads/yvideo/")通过这个方法转成绝对路径也不行,但是把这个路径传到fs.root.getFile这个方法内就能获取到文件信息
2022-12-14 15:14
2***@qq.com
回复 9***@qq.com: 你好,我也碰到这个问题,请问搞清楚是怎么回事了没?
2023-05-31 23:20