I am using cocoonJS since cordova is not properly working for me through intelXDK. The zip file which cocoonJS is making has both m4a and .ogg files, which is making the zip heavier. So i manually have removed the .ogg files since i heard m4a files works fine on all IOS versions than ogg files.
After this removal my sounds were stop and no audio was playing. So i checked the log of cocoonjs and found this error
- Audio Load Error: Could not find audio file named "www/xyyz.ogg"
So i thought maybe somewhere inside construct2 js is forcefully using ogg file. So after few hours of work i have edited the JS part and made the following changes
useOgg = !!(new Audio().canPlayType('audio/ogg; codecs="vorbis"'));
useOgg = false;[/code:3j2hr0hq]
I had to make this false because my iPAD had vorbis codec i believe that is why it was running ogg files from the start.
After this editing my all m4a files started working correctly.
Now my confusion is does ogg files required in any kind of ios instead of m4a files? I need to make my app less heavier to compile through cocoonjs which takes 30mb only...So i am thinking to remove all the ogg files and just allow m4a to run on all version of ios but i am confuse if i am taking a right choice about audio???