Create a custom audio loader

An issue occurs when using Phaser with Capacitor. Sounds are not parsed by Phaser unless the source is external to the app’s assets. Live dev mode on device doesn’t encounter this issue since the assets are served by the dev computer.

I’ve found this stackoverflow post, suggesting:

Have the same problem. I found out that only with ios platform phaser loader can’t parse ArrayBuffer on sound load. That’s why I load audio with simple fetch and add to phaser with scene.sound.decodeAudio

I’ve started creating a basic HXR2 loader. Now I must register it as a “phaser-compatible” loader.
If anyone has a customer loader for any type of asset, please share. I just need to make this integrate well enough in the preload step.

Thanks,