native-audio
native-audio copied to clipboard
Audio Asset already exists
Describe the bug
Audio Asset already exists

To Reproduce
Steps to reproduce the behavior:
Where to place audios asset, npx cap copy
doesnt copy to public asset, when i place de file on android/app/src/main/assets
Expected behavior Playd audios
Desktop (please complete the following information):
- OS: Android
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: Moto G6
- OS: Android 9
Additional context Capacitor 4 Ionic 6 Angular 13
I get the same error from time to time, I'm not sure why. I looked at the code and can't figure out why. Let me know if you find the solution for this...
I have the same problem, I'm using capacitor 3 because I have to use it in order to use serial bluetooth (cordova plug-in). This audio error is delaying my project, if you find something let me know.
Can any of you reproduce this "always"? Can you share a project that can reproduce this? I have this sometimes and it doesn't reproduce on my simulator...
Can any of you reproduce this "always"? Can you share a project that can reproduce this? I have this sometimes and it doesn't reproduce on my simulator...
@HarelM I have my project, but it's private and also part of it is in Portuguese because that's what the team asked for.
Can you narrow it down somehow to make a reproducible example (P.S. I'm not the maintainer of this package)
Coming to think about it, I haven't seen this issue lately since I switched to use @capgo/native-audio
so it's worth a shot.
It also fixes another issue I had with other apps (spotify for exmaple) stopping when opening my app.
Coming to think about it, I haven't seen this issue lately since I switched to use
@capgo/native-audio
so it's worth a shot. It also fixes another issue I had with other apps (spotify for exmaple) stopping when opening my app.
It seems like a good option, I'm about to start using it, I got the same error that the audio already exists, but I'm trying to solve it, I'll come back here and let you know if I succeed.
Describe the bug
Audio Asset already exists
![]()
To Reproduce Steps to reproduce the behavior: Where to place audios asset,
npx cap copy
doesnt copy to public asset, when i place de file onandroid/app/src/main/assets
Expected behavior Playd audios
Desktop (please complete the following information):
- OS: Android
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: Moto G6
- OS: Android 9
Additional context Capacitor 4 Ionic 6 Angular 13
dear friends @HarelM and @matudelatower , a possible solution is to use after the play() method is to trigger the unload() method, other information, make each file name and id be written with single quotes (ie leave them all in single quotes or double quotes).