循环播放视频,android出现loading
我们的应用,用了个视频做为首页的主体,视频要循环播放,视频每次从头播放时都会出现一个loading,有没有办法解决?
视频已下载到本地才播放的,没有网络问题
代码:
onLoad: function () { wx.showLoading({ title: '正在加载' , }); let _this = this ; wx.downloadFile({ url: "xxxxxx" , success: (e) => { let videoTmpPath = e.tempFilePath; _this.setData({ videoUrl: videoTmpPath }); wx.hideLoading(); }, fail: e => { wx.hideLoading(); } }); }, |
< video src = '{{videoUrl}}' wx:if = "{{videoUrl}}" id = "video" controls = "{{false}}" objectFit = "fill" loop autoplay muted class = 'video' ></ video > |