I found another bug on html5 firefox android browser. The preloader always stuck. I’ve tried with piratepig examples and the result same. But on android chrome working fine.
I’ve tried with or without -Dcanvas the result still stuck on firefox android.
Have you tried debugging, to see if it is throwing an error? Do you think it is possible it is the font it is getting stuck on? (DisplayingABitmap has an image, but no font, PlayingSound has sound, but no font, etc)
Note : for piratepig examples sometimes get stuck not always, but for my game it’s always stuck. I tried to downgrade the openfl version to 4.9.2 the result still same like above. No error from openfl / lime.
I can provide you my source code if you need it.
After I remove fonts, the error of font disappear but still stuck.
After I remove fonts and sound the preloader successfully loaded. For Sound I’m using .mp3 and .ogg.
Also for first time load including font and sound assets (clean cache), I get this error, on 2nd reload no error font and sound but my preloader still stuck :
Ok, I think it’s because of .mp3 sound. Everytime I include .mp3 on firefox android it cause preloader stuck. If I only include .ogg without .mp3 the preloader load success.
But If I only include .ogg, some browser can’t load .ogg sound too. I must include .mp3 and .ogg.
Ah you’re right. It’s because of sound limit on firefox android. Total I have 120 sound (60.mp3 and 60.ogg). If I reduce it become 100 sound the preloader run success. Is there any way to increase the sound limit on firefox android?
This is the first I have heard of it. Perhaps it would be possible to set sounds to embed="false" and load/unload them at runtime later, as you probably don’t need them all at once?
When you do this, we should keep it in cache, so you may have to either set caching to false in loadSound or go to Assets.cache to remove the sound when you are done with it.
It might also be necessary to call sound.close () to get our HTML5 sound library to dump the loaded sound
Thank you for the example. I use Assets.LoadLibrary instead of Assets.loadSound.
But, today I tried with 100sounds limitation still get stucked again same source code like yesterday.
It’s very confusing now
But the main issue was .mp3, because when I not include .mp3 the preloader was successful on firefox android.
And even when using Assets.LoadLibrary I still get error when load the sound: The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully.
Or I’m wrong when saving .mp3? I already tried it with any method of saving .mp3 and this .mp3 issue only at firefox android.
Or maybe it’s bug from firefox android self? I’m using the latest version 54.0.1 on android device.