[LayaAirIDE 1.0]WX小游戏声音_audio报错问题

版本 1.7.19
本想复用 : =11.3ptLaya.SoundChannel 奈何在微信中 , 报错
VM6099:1 gameThirdScriptError
Cannot read property 'play' of null
TypeError: Cannot read property 'play' of null
    at MiniSoundChannel.__proto.play (http://127.0.0.1:24812/game/code.js:22424:14)
    at SimpleSoundManager.SimpleSoundManager.playSound (http://127.0.0.1:24812/game/code.js:92328:37)
    at FootBallCtrl.SetPosition (http://127.0.0.1:24812/game/code.js:94285:51)
    at FootBallCtrl._update (http://127.0.0.1:24812/game/code.js:94213:18)
    at MeshSprite3D.__proto._updateComponents (http://127.0.0.1:24812/game/code.js:70809:36)
    at MeshSprite3D.__proto._update (http://127.0.0.1:24812/game/code.js:86537:9)
    at Scene.__proto._updateChilds (http://127.0.0.1:24812/game/code.js:77514:19)
    at Scene.__proto._updateScene (http://127.0.0.1:24812/game/code.js:77710:8)
    at Stage.__proto.render (http://127.0.0.1:24812/game/code.js:18576:23)
    at Stage.__proto._loop (http://127.0.0.1:24812/game/code.js:18522:8)
 
解决方案 : 
找到音效停止的地方 , 注释 : this._audio= null; , 防止将audio回收即可..
B01.png
已邀请:

Aar0n

赞同来自:

感谢~!

要回复问题请先

商务合作
商务合作