native-audio icon indicating copy to clipboard operation
native-audio copied to clipboard

Audio Asset already exists

Open matudelatower opened this issue 2 years ago • 8 comments

Describe the bug

Audio Asset already exists

image

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

matudelatower avatar Oct 26 '22 16:10 matudelatower

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...

HarelM avatar Oct 27 '22 16:10 HarelM

image 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.

Lucas-Wanat avatar Jan 18 '23 17:01 Lucas-Wanat

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 avatar Jan 18 '23 17:01 HarelM

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.

Lucas-Wanat avatar Jan 18 '23 18:01 Lucas-Wanat

Can you narrow it down somehow to make a reproducible example (P.S. I'm not the maintainer of this package)

HarelM avatar Jan 18 '23 18:01 HarelM

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.

HarelM avatar Jan 18 '23 18:01 HarelM

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.

Lucas-Wanat avatar Jan 19 '23 12:01 Lucas-Wanat

Describe the bug

Audio Asset already exists

image

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

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).

Lucas-Wanat avatar Jan 19 '23 14:01 Lucas-Wanat