APP热更新
This commit is contained in:
@@ -117,14 +117,14 @@
|
||||
methods: {
|
||||
async init(){
|
||||
const self = this;
|
||||
//console.log(this.message?.videoElem);
|
||||
console.log(this.message?.videoElem,this.conversationID);
|
||||
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
|
||||
self.coverDownloading = true;
|
||||
//console.log(snapshotUrl);
|
||||
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
|
||||
self.coverDownloading = false;
|
||||
self.src = fn;
|
||||
console.log(fn);
|
||||
//console.log(fn);
|
||||
});
|
||||
},
|
||||
clickMediaItem() {
|
||||
@@ -138,20 +138,22 @@
|
||||
this.loadingWidth = "auto";
|
||||
},
|
||||
onOverlayClick() {
|
||||
const _this = this;
|
||||
// 点击覆盖层:如果视频已缓存则直接播放,否则开始下载
|
||||
const url = this.message?.videoElem?.videoUrl || this.message?.videoElem?.videoPath;
|
||||
const url = _this.message?.videoElem?.videoUrl;
|
||||
if (!url) {
|
||||
uni.showToast({ title: '无可下载的视频' });
|
||||
return;
|
||||
}
|
||||
this.videoDownloading = true;
|
||||
this.videoDownloadProgress = 0;
|
||||
util.downloadFile(url, `${this.conversationID}`, (prog) => {
|
||||
//this.videoDownloadProgress = prog;
|
||||
_this.videoDownloading = true;
|
||||
_this.videoDownloadProgress = 0;
|
||||
util.cacheFile(url, `${_this.conversationID}`, (prog) => {
|
||||
//console.log(prog);
|
||||
this.videoDownloadProgress = prog;
|
||||
}).then((fn) => {
|
||||
this.videoDownloading = false;
|
||||
this.videoExists = true;
|
||||
this.playVideo(fn);
|
||||
_this.videoDownloading = false;
|
||||
_this.videoExists = true;
|
||||
_this.playVideo(fn);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user