cordova-plugin-nativeaudio icon indicating copy to clipboard operation
cordova-plugin-nativeaudio copied to clipboard

preloadSimple not playing audio iOS

Open adampru209 opened this issue 6 years ago • 9 comments

I am creating about 20 sound effect assets and playing them with preloadSimple(id, path, success, error). This plugin has worked perfectly for me up until yesterday. While I have made no direct or significant changes that deal directly with this plugin or how I'm handling it, it has ceased to work when I deploy and test on my iphone 5s. Plugin still works with browser and Android builds. Even more strange is that assets are being loaded and the success callback is being triggered. Any help with this issue would be greatly appreciated.

adampru209 avatar Oct 29 '17 10:10 adampru209

@adampru209 Having this exact same issue? Did you ever get this resolved

darkthsideous avatar Sep 08 '18 23:09 darkthsideous

I'm having the same issue, somewhat urgent...

I've tried to use the preloadComplex, but it didn't work for me.

Any solution on this?

jorgster avatar Sep 14 '18 10:09 jorgster

@adampru209 @darkthsideous @jorgster Did anyone of you solve this issue? I'm exactly facing the same. It worked some weeks ago, but it doesn't work on iOS any more.

It probably stopped with some new iOS version, but I'm not sure about that.

Any help would be really much appreciated.

svzi avatar Mar 04 '19 17:03 svzi

@svzi I believe I use another plugin to achieve this, just bypassed the whole plugin on iOS. Did everything in ionic so if you're using that framework, just use the other music/sound plugin (there are 2 for ionic 3).

jorgster avatar Mar 04 '19 17:03 jorgster

@jorgster Thanks for your quick reply, appreciate that. I'm using Ionic 3 as well, could you please tell me which other plugin you're exactly using? Do you mean the media plugin (https://ionicframework.com/docs/v3/native/media/)?

svzi avatar Mar 04 '19 17:03 svzi

@svzi yes I created the asset I wanted to play and then played it. You have to create a media mediaobject, but you don't have to preload it at all. So in a sense it's pretty much easier than on android.

jorgster avatar Mar 04 '19 22:03 jorgster

Thanks a lot @jorgster ! I've implemented the plugin for iOS as well, and everything works like a charm right now.

Just one last question: why did you decide to stick with this plugin for Android? Wouldn't it be easier to use only one plugin for sound playback?

svzi avatar Mar 29 '19 14:03 svzi

I had it working on android and no service deal on the project so just left it in there. Best practice would probably be to only use one plugin.

jorgster avatar Mar 29 '19 15:03 jorgster

@jorgster haha, funny. Same here. That's also the reason why I took me so long to take care on this. Anyway thanks for your feedback, appreciate that!

svzi avatar Mar 29 '19 15:03 svzi