Why cocoonjs is using .ogg files in IOS even when i remove

Discussion and feedback on Construct 2

Post » Thu May 21, 2015 11:14 pm

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

Code: Select all
useOgg = !!(new Audio().canPlayType('audio/ogg; codecs="vorbis"'));
useOgg = false;


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???
B
9
S
2
Posts: 108
Reputation: 1,010

Post » Fri May 22, 2015 9:21 am

Are you using Canvas+? If so, it is the expected result :).
In the Webview+ for iOS is when you must use m4a. But in Canvas+, it is required to use .ogg.

Regards
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Fri May 22, 2015 10:54 am

Yes i am using Canvas+ because webview never shows anything on the screen and always displays black-screen. I made a very simple testing app and i am attaching here but if you run this with Webview it will display black screen without any single error.. that is why i was using canvas+, please can you guide me why its black screen i am using simple depreciated export by scirra on cocoonjs..

https://dl.dropboxusercontent.com/u/104183650/newproject.zip
B
9
S
2
Posts: 108
Reputation: 1,010

Post » Fri May 22, 2015 2:08 pm

Hello,

I can't run the file you sent me on the browser nor in the launcher. It seems something is wrong with the project itself.
Can you please send me a capx and the steps you followed to export it?

Cheers
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Fri May 22, 2015 5:27 pm

here is my zip file i again exported using minify JS with depreciated Cocoonjs exporter from Construct2 Release 200.

Exported Zip : https://www.dropbox.com/s/rrs7sn43yrmks ... t.zip?dl=0

Capx: https://www.dropbox.com/s/9l88vihesypw5 ... .capx?dl=0
B
9
S
2
Posts: 108
Reputation: 1,010

Post » Sat May 23, 2015 11:14 am

@Ludei are you able to find the problem???
B
9
S
2
Posts: 108
Reputation: 1,010

Post » Mon May 25, 2015 10:01 am

Hello,

No, because you deleted the files. Remember this is not our forum, we are not constantly checking it. In addition, there was a weekend in the middle :).

Cheers
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Mon May 25, 2015 5:18 pm

@Ludei extremely sorry , here are the files once again ... I by mistake deleted that.

CAPX: https://dl.dropboxusercontent.com/u/104 ... oject.capx

Exported Project ZIP: https://www.dropbox.com/s/rrs7sn43yrmks ... t.zip?dl=0
B
9
S
2
Posts: 108
Reputation: 1,010

Post » Tue May 26, 2015 10:32 am

I can run your project perfectly in the launcher. It has sound, it gets the .ogg files as it is supposed to because it is Canvas+. There is not a blank screen by now. I will try compiling the project.

Edit: It works too once it is compiled.

Edit2: It works in the new cloud too, apart from the known issue we are currently solving regarding ScreenCanvas and WebGL.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests