用cc.audioEngine.isMusicPlaying()判断音乐是否播完的时候,有时会报错
Uncaught TypeError: Cannot read property ‘playbackState’ of null
cc.Audio.cc.Class.extend.getPlaying
cc.audioEngine.isMusicPlaying
我在CCAudio.js的getPlaying(),把里面的
if(sourceNode"playbackState"] == null)
return this._playing;
改为
if(!sourceNode || sourceNode"playbackState"] == null)
return this._playing;
临时解决一下,麻烦官方看看