nativeAudio works using browser platform, not with android


if I run ionic cordova run browser the following code works fine. However if I run ionic cordova run android it doesn’t work and I get a Prepare failed.: status=0x1

    this.nativeAudio.preloadSimple('BirdSong', 'assets/sfx/file.ogg').then(()=>{


I am running this code when platform.ready() and/or when I click a button but no luck. Am I missing something obvious?

If I purposely try to load an audio file I know doesn’t exist I get a different error stating the file was not found (expected behaviour, more a case of me proving to myself that it’s at least trying to load the file) www/assets/sfx/NOT_FOUNDbirdsong.ogg



   ionic (Ionic CLI)  : 4.1.2 (C:\Users\CT14.IT\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0


   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, browser 5.0.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.1.4, (and 7 other plugins)


   Android SDK Tools : 26.1.1 (C:\Users\CT14.IT\AppData\Local\Android\Sdk)
   NodeJS            : v8.11.1 (C:\Program Files\nodejs\node.exe)
   npm               : 5.1.0
   OS                : Windows 10
1 Like

OK so the issue is, it doesn’t like ogg files it seems!

Works fine with an mp3.