Open Jorgeous opened 10 years ago
A little solution I've found that fixes the firefox crashing is just removing the .mp3 files.. in that case, the game just uses the .ogg but that will drop out the Safari browser's music (and SFX's) so I bet that is not a useful solution.
Any thoughts?
Another little detail. Is not just the mp3. With Chrome, with just the .ogg, it crashes too (not crashing in this case in Firefox). Ok. This is maybe because a memory issue or something that scapes from my imagination (maybe Chrome just doesn't work ok in some devices?).
The only difference I found with Phaser is that in my android mobile, Chrome+ogg sounded pretty well and here with Flambe the sound was muted (using the same .ogg file). In the tablet I have, both crashed. Firefox works well in ogg in both devices but crashes when adding the mp3, in the screen when loading.
*I've already tried to reduce the bitframe to 18kbps, 8 kHz.. Also I tested the same phaser ogg example that worked in the mobile Chrome (sounding!) and no luck here.
*- CPU 4x1,2 Ghrz Cortex A7 QUAD-CORE.
Android 4.2.2 Last Chrome version. Also tried Chrome Beta. Used the haxe_flags to disable webgl
Already killed all the tasks using Advanced Task Killer (Free). It has 500 mg of free ram and a lot of free space.
I think that there is not solution for Chrome at all because I've tested a Construct 2 example of Audio and it also got crashed in Chrome (not in Firefox). The curious thing is that when testing a simple .Ogg in chrome, it runs. When adding a simple .ogg to the horses sample, it crashes. Mp3 also crashes firefox. If I leave the sounds folder empty and not requesting any audio file, it works in all the devices/browsers with not crash.
To raise Flambe to the actual state of the art of other engines like construct 2 and phaser it would be nice to detect just before loading anything if we are in a firefox/android/html context and avoid as a nightmare the mp3 loading because it just crashes firefox.
About Chrome in android.. what can I say? maybe they will fix the bug eventually. Only one thing, Chrome in the phaser sprites example in my mobile works sounding (with phaser examples it doesn't sound at all, maybe it is blacklisted). In the tablet Chrome crashes in all the contexts. (they used .ogg: fx_mixdown.ogg) http://examples.phaser.io/_site/view_full.html?d=audio&f=audio+sprite.js&t=audio%20sprite
I have 2 (of 8 tested) friends that couldn't open the game with 1 chrome/2 the native browser that come with the mobile.
Firefox avoiding mp3 will be a nice advance when fixed.
I've tested this in the tablet with chrome and the sound works with no crashing.
http://jsfiddle.net/aarongloege/rQv5h/light/
this game worked in chrome-tablet with sound: www.pirateslovedaisies.com
So it is possible to manage this issue. At least in theory. I've tried some html5 games and the 10% worked in my tablet-android-chrome browser. So...
Tested the horses demo in chrome with no sound at all and commented this line playbacks.set(id, pack.getSound("horse"+id).loop());
It worked fine (muted) in chrome browser in android. The other options, even just loading 1 .ogg, didn't work out.
The solution is related with the WebAudio and can be fixed using (at least in theory) the techique called Audio Sprites using one .ogg but I couldn't get this working. Anyway, in the future the browsers will fix this problem by themselves. I suggest to detect the firefox-android-html browser and suppress the mp3 loading (like in the knowledged flag related with the issue in desktop firefox-mp3). My 5 cents!
I would like to notice to the Flambe community that the Firefox/Chrome browser in an android tablet (4.2.2) and in some mobile devices of friends, when I insert mp3's files in the assets folder (with or without .ogg's), when loading the html5 app [shump, horses], the browser stops the execution or freezes the device (just with Chrome), not even loaded the full bar.
I would like a patch to solve this issue avoiding the mp3 loading when Flambe detects that we are in an html5-android enviroment. In that case, .ogg is the king and the solution and the mp3 should not be loaded. Just load the .ogg.
Nowadays this is not possible and Firefox/Chrome still crashes in html5-android-sound demos. (In some devices, I bet in others this is not happening: I've tested this in 3 android's friends and just 1 could open the game).