恢复视频的发布

This commit is contained in:
cansnow
2026-02-15 19:40:36 +08:00
parent 7c6656d1fc
commit abd279e7a7
22 changed files with 236 additions and 129 deletions
@@ -51,11 +51,6 @@
return 120 * aspectRatio;
}
},
watch: {
src(newVal, oldVal) {
console.log(newVal,oldVal);
}
},
created() {
this.init();
},
@@ -63,18 +58,38 @@
async init(){
const self = this;
let url = "";
const pictureElem = this.message.pictureElem;
// 如果有远程 snapshotUrl,则下载到 coverCachePath
//const snapshotUrl = (this.message.pictureElem.snapshotPicture?.url ?? this.message.pictureElem.sourcePath );
const snapshotUrl = this.message.pictureElem.sourcePicture?.url;
let snapshotUrl = pictureElem?.sourcePath;
if(snapshotUrl && await util.fileExsit(snapshotUrl)){
self.src = snapshotUrl;
return ;
}
snapshotUrl = (pictureElem?.sourcePicture.url ?? pictureElem.bigPicture?.url);
if(!snapshotUrl){
console.log(this.message);
return;
}
//console.log(snapshotUrl);
console.log(snapshotUrl);
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
self.coverDownloading = false;
self.src = fn;
//console.log(fn);
console.log(fn);
});
},
getShowPath(url){
return new Promise((resolve,reject)=>{
if(url.startsWith('file')||url.startsWith('_')||url.startsWith('http')||url.startsWith('blob')){
return resolve(url);
}
plus.io.resolveLocalFileSystemURL(url, function(entry) {
return resolve(entry.toLocalURL());
}, function(e) {
console.log(e);
resolve(url);
});
});
},
clickMediaItem() {