Error: There was an issue creating the audio player #28
-
|
Hello, and thank you for maintaining this plugin. I'm working on an app that generates a WAV file and stores it in the user's device, based on some settings that the user specifies on the app. After the audio file is generated, it plays the audio using the capacitor-community/native-audio. The Audio must play even when the app is sent to the background. The above works on iOS, but I couldn't get the capacitor-community/native-audio to play the audio when the user sends the app to the background. This is a known issue which is why I wanted to try this plugin. The issue is that when I try to preload the audio before playing it, I will get an error: 'There was an issue creating the audio player', which is not very descriptive of what the problem is.
Do you have an idea of what the problem might be? LMK if I can provide other details, and thank you in advance. Here's an example of the code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
You should be seeing an exception in the error too 🤔 as it's passed to Either way, your issue is that you must have an audio source with |
Beta Was this translation helpful? Give feedback.
You should be seeing an exception in the error too 🤔 as it's passed to
reject.Either way, your issue is that you must have an audio source with
useForNotification = truefirst. You cannot just have one withisBackgroundMusic = true.