I use Cocos2d-js published from Cocos Studio (v2.3) and Cocos Framework (v3.7).
I have a problem with the playing music.
I use wav audio file to play BGM with cc.audioEngine.playMusic() method.
But when I load audio and play on the first scene, music does not play until I touch the screen…
I check with cc.audioEngine.isMusicPlaying() method to see if the music is playing or not.
but it always returns true, and It doesn’t make sense to me…
Can somebody advise me, please?
As far as I know, it is a limitation imposed by iOS Safari. I think iOS Chrome gives the same behavior. You MUST touch the current web document once to let any internal sound play.
But I believe that isMusicPlaying should return false in these cases. I would consider that a bug.