循环播放视频,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[代码][代码]>[代码]