@nickname, 根本无法使用这个api....
InnerAudioContext.offTimeUpdate报错- 当前 Bug 的表现(可附上截图) [图片] [图片] - 预期表现 - 复现路径 - 提供一个最简复现 Demo [代码]playAudio:[代码][代码]function[代码][代码](r){[代码][代码] [代码][代码]let that = [代码][代码]this[代码] [代码] [代码][代码]let myAudioObj = that.data.myAudioObj[代码] [代码] [代码][代码]utils.consoleLog(r.target.id)[代码][代码] [代码][代码]let id = r.target.id-1[代码] [代码] [代码][代码]var[代码] [代码]innerAudioContext = utils.isNull(myAudioObj[id])?wx.createInnerAudioContext():myAudioObj[id][代码][代码] [代码][代码]myAudioObj[id] = innerAudioContext[代码] [代码] [代码][代码]// 判断有无上一段音频播放状态,如果有则进行停止重置(非暂停哦)[代码][代码] [代码][代码]if[代码][代码](that.data.audioId>0 && myAudioObj[that.data.audioId-1] && !myAudioObj[that.data.audioId-1].paused){[代码][代码] [代码][代码]myAudioObj[that.data.audioId-1].stop()[代码][代码] [代码][代码]}[代码][代码] [代码][代码]let audioData = that.data.audioData[代码][代码] [代码][代码]innerAudioContext.src = audioData[id].site[代码][代码] [代码][代码]innerAudioContext.play();[代码][代码] [代码][代码]innerAudioContext.onPlay(() => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]audioId:r.target.id[代码][代码] [代码][代码]})[代码][代码] [代码][代码]innerAudioContext.onTimeUpdate(() => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]audioNow:innerAudioContext.currentTime,[代码][代码] [代码][代码]audioTime:innerAudioContext.duration[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]pauseAudio:[代码][代码]function[代码][代码](r){[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]let id = r.target.id-1[代码][代码] [代码][代码]let myAudioObj = that.data.myAudioObj[代码][代码] [代码][代码]if[代码][代码](!utils.isNull(myAudioObj[id])){[代码][代码] [代码][代码]let innerAudioContext = myAudioObj[id][代码][代码] [代码][代码]innerAudioContext.pause()[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]stopAudio:[代码][代码]function[代码][代码](r){[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]let id = r.target.id-1[代码][代码] [代码][代码]let myAudioObj = that.data.myAudioObj[代码][代码] [代码][代码]if[代码][代码](!utils.isNull(myAudioObj[id])){[代码][代码] [代码][代码]var[代码] [代码]innerAudioContext = myAudioObj[id][代码][代码] [代码][代码]innerAudioContext.stop()[代码][代码] [代码][代码]innerAudioContext.offTimeUpdate(() => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]audioNow:0,[代码][代码] [代码][代码]audioTime:0[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]innerAudioContext.onStop(() => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]audioId:0[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码]
2019-04-24同关注! android版本支持转发,IOS不支持转发,那么下载下来就只能看看了,我需要打印出来,但IOS版连转发都不支持,完全没办法用啊,麻烦尽快添加转发功能哦
转发微信小程序里下载的xls表格- 需求的场景描述(希望解决的问题) 用户下载EXCEL表格文件后, 只能打开, 不能在微信里转发文件. - 希望提供的能力 用户可以在微信里转发下载的EXCEL文件
2019-04-18