haxegon icon indicating copy to clipboard operation
haxegon copied to clipboard

html5: when a browser can't find the music asset it needs, trace an error message and continue instead of crashing

Open TerryCavanagh opened this issue 7 years ago • 2 comments
trafficstars

TerryCavanagh avatar Jan 10 '18 12:01 TerryCavanagh

Oh, looks like this would require overwriting the lime preloader? Maybe it's time I did that anyway. Ok! https://github.com/TerryCavanagh/haxegon/issues/92

TerryCavanagh avatar Jan 10 '18 19:01 TerryCavanagh

This one's pretty complicated, it turns out.

Openfl secretly renames assets when loading them on different browsers - so if you have code to load a .ogg file on Microsoft Edge, for example - Edge will actually try to load an mp3 file. If the mp3 version is there, then great! If not, it'll crash - and worse than that, it'll crash and tell you that it's because it can't find the .ogg file.

Fixing this properly is going to involve some openfl pull requests, I think.

TerryCavanagh avatar Jan 13 '18 18:01 TerryCavanagh