恢复视频的发布
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user