[LayaAir 2.0]Cannot read property 'offCanplay' of null

游戏公测的时候,后台很多这样的报错。
 
Cannot read property 'offCanplay' of null
TypeError: Cannot read property 'offCanplay' of null
at n.onCanPlay (https://usr/game.js:39:9226)
at Function.t (https://lib/WAGameSubContext.js:2:153278)
Cannot read property 'offCanplay' of null;at audioContext.oncanplay callback function
TypeError: Cannot read property 'offCanplay' of null
at n.onCanPlay (https://usr/game.js:39:9226)
at Function.t (https://lib/WAGameSubContext.js:2:148325)
我查了一下,也就一个地方,用到,在laya.wxmini.js
  onCanPlay() {
this.loaded = true;
this.event(Laya.Event.COMPLETE);
this._sound.offCanplay(null);
}

估计是因为网络比较满的情况,在文件下载完毕之后,sound对象已经被销毁了,所以自己加了一个判断。
	    onCanPlay() {
this.loaded = true;
this.event(Laya.Event.COMPLETE);
if(this._sound){
this._sound.offCanplay(null);
}
}
有遇到一样问题的哥们吗?
已邀请:

要回复问题请先

商务合作
商务合作