angelkom Posted February 25, 2014 Share Posted February 25, 2014 The music and the sound doesn't play if the internet connection is off on cocoonjs Update: Yesterday I was in bed and I couldn't sleep I was thinking how to fix the sound. I had the game in my phone and I remembered on the sound engine source files so I checked them. What I noticed is that Enpu has disabled the sound if there is no internet connection on the smartphone. I don't know why he did that but maybe he did it on mistake, anyway here is the fix: 1.Open the sound.js located in the engine folder 2. Go to line 46 and notice this statement: if(!navigator.onLine && game.ua.mobile) { game.SoundManager.webAudio = game.SoundManager.enabled = false; } this tells the sound engine to not play if there is no internet on the mobile. 3. There are two ways two fix it: 3.1 Set game.SoundManager.webAudio = game.SoundManager.enabled = true; 3.2 Delete the whole statement. I think the second deleting the whole statement is better and it doesn't give any errors I checked in the cocoonjs console Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.