Jump to content

CocoonJS Android won't load sound in Canvas+ mode


Ninjadoodle
 Share

Recommended Posts

Hi guys

 

CocoonJs is giving me some headaches :(

 

Just wondering if anyone's had any experience with this. I have both M4A and OGG sound files and everything works on iOS and Android Webview+, but as soon as I try to run the game in Canvas+ on Android, it gives me an audio load error.

 

Thank you heaps for any help!

Link to comment
Share on other sites

Hi @Ludei

 

Thank you for the reply! On iOS everything works fine.

 

On Android it only works in webview / webview+

 

I have both m4a and ogg sound files and the error I get states ...

 

Audio load error ...

Could not find a suitable audio decor for file ... (ogg file)

 

Would you like me to put together a sample Panda JS project to look at?

Link to comment
Share on other sites

Hi @enpu

 

You're perfectly right. I created a new project and the sounds work correctly.

 

I have absolutely no idea what is wrong with the other project.

 

I guess, the only thing I can do is slowly paste code into the new project until I encounter an error, as I really have no idea what's wrong :(

 

Thank you for you help!

Link to comment
Share on other sites

Hi @enpu

 

Here is the config ...

pandaConfig = {    sitelock: 'ninjadoodle.com',    name: 'ClickPlaytime5',    version: '1.0.0',    disableCache: true,    loader: {        barWidth: 100,        barHeight: 10    },    audio: {        stopOnSceneChange: false    },    system: {        //webGL: true,    	idtkScale: 'scaleAspectFit', // COCOON JS	    hires: 4,        retina: true,        scaleToFit: true, // DESKTOP BROWSERS	    resizeToFill: true, // MOBILE BROWSERS	    width: 480,	    height: 320.    },    storage: {        id: 'com.ninjadoodle.clickplaytime0005'    }};

and here is a part of the assets.js ...

game.module(    'game.assets').require(    'engine.audio').body(function() {// AUDIOgame.addAudio('audio/woosh.*', 'woosh');game.addAudio('audio/harpOk.*', 'harpOk');game.addAudio('audio/harpGo.*', 'harpGo');game.addAudio('audio/harpPass.*', 'harpPass');game.addAudio('audio/harpFail.*', 'harpFail');game.addAudio('audio/harpIntro.*', 'harpIntro');game.addAudio('audio/click.*', 'click');game.addAudio('audio/beep.*', 'beep');game.addAudio('audio/sineThrowA.*', 'sineThrowA');game.addAudio('audio/sineThrowB.*', 'sineThrowB');game.addAudio('audio/drop.*', 'drop');game.addAudio('audio/impactMetal.*', 'impactMetal');game.addAudio('audio/sigh.*', 'sigh');game.addAudio('audio/yay.*', 'yay');game.addAudio('audio/doorOpenRoll.*', 'doorOpenRoll');game.addAudio('audio/padlock.*', 'padlock');game.addAudio('audio/ufo.*', 'ufo');game.addAudio('audio/moo.*', 'moo');game.addAudio('audio/crash.*', 'crash');game.addAudio('audio/crash2.*', 'crash2');game.addAudio('audio/slipperyFish.*', 'slipperyFish');game.addAudio('audio/theme.*', 'theme');game.addAudio('audio/themeIntro.*', 'themeIntro');game.addAudio('audio/themeStinger.*', 'themeStinger');
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...