Ninjadoodle Posted November 5, 2014 Share Posted November 5, 2014 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! Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 What Android version? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 Hi @enpu It's 4.3 Quote Link to comment Share on other sites More sharing options...
Ludei Posted November 5, 2014 Share Posted November 5, 2014 Hello, Can you please provide us with a test case? We will have a look at it. In addition, here we have a sound demo you might find helpful: https://github.com/ludei/cocoonjs-demos/tree/master/Sound Regards. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 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? Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 Can you send me your OGG file so i can test it with my devices? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 Hi @enpu I sent you a couple of small files Thank you again for the help! Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 Hmm, loading and playing fine here on Nexus 5 (Android 4.4.2) Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 Oh man, why can't this be easy haha I really don't know how to bug-test this. I'll try to create a new project and load the same files. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 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! Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 Can you show your code where you are adding the sounds, and your config.js? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 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'); Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 Try to remove line disableCache: true, from your config, and see if it makes any change. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 Oh man! So simple It works! Thank you very much, I would have never thought of that (unless I was pasting line by line). Quote Link to comment Share on other sites More sharing options...
enpu Posted November 5, 2014 Share Posted November 5, 2014 Ok so this seems to be issue with CocoonJS not able to load audio url like: audio.ogg?123598753 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted November 5, 2014 Author Share Posted November 5, 2014 Hi @enpu Hopefully they keep an eye on this topic 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.