微信公开课
微信公开课小程序热门讨论关于「小程序每次播放到第21回时出现内存泄漏提示」的小程序开发问题
补充:一个汉字发音小程序,每次播放到第21个字时,在开发者工具上会有如下提示(在真机上运行会比较卡顿)21listenersofevent154840963672705245944830972495_onAudioStateChange_playhavebeenadded,possiblyc
展开:一个汉字发音小程序,每次播放到第21个字时,在开发者工具上会有如下提示(在真机上运行会比较卡顿):[Event]21listenersofevent154840963672705245944830972495_onAudioStateChange_playhavebeenadded,possiblycausingmemoryleak主要代码如下constn=wxcreateInnerAudioContext(); voice2:function(){ if(thishasShowSound&&thisdatahasEnded){thisplaySoundQues();}elseif(thisdatahasEnded&&thishasShowSound==!1){thisshowMo();}else{thisvoiceStop();} }, voiceStop:function(){ nstop(); }, playSoundQues:function(){letthat=this; lett=getApp(),a=thisdataanswer,e=aqa; nautoplay=!0, nsrc=https:tsnbaiducomtext2audio?tex=+encodeURI(e)+***此处省略***+tglobalDatatoken+&per=0&spd=5&pit=5&vol=5,nplay(), nonPlay(function(){thatsetData({hasEnded:!1});nextEnable=!1; }),nonEnded(function(){thatsetData({hasEnded:!0});nextEnable=!0; }),nonStop(function(){thatsetData({hasEnded:!0});nextEnable=!0; }),nonError(function(t){ nextEnable=!0,consolelog(error1,terrMsg),consolelog(errorcode==,terrCode); }); },即速小程序:麻烦提供下代码片段:https:developersweixinqqcomminiprogramdevdevtoolsminicodehtml
更多有关「小程序每次播放到第21回时出现内存泄漏提示」的讨论可以前往微信公开课小程序参与互动哦!了解更多
方法1:微信扫描微信公开课小程序码即可订阅热门讨论「小程序每次播放到第21回时出现内存泄漏提示」
方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「小程序每次播放到第21回时出现内存泄漏提示」
方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「小程序每次播放到第21回时出现内存泄漏提示」
微信公开课小程序热门讨论「小程序每次播放到第21回时出现内存泄漏提示」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。
微信公开课热门讨论「小程序每次播放到第21回时出现内存泄漏提示」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。