You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added this library to my project and I found out that my audio file was not being played. I thought it was due to the file location and the "assetPath" variable, buy I realized it was caused by a "bug" in the .loop() method I was calling. I was expecting for the audio to reproduce with the loop call, but this was not the actual behavior. Its confusing and it does not correspond with the documentation:
/**
This method will loop the audio file for playback.
Yeah, it was a bit confusing for me too.
A good solution would be for loop function to check if the audio file is already being played and if not start playing it.
Have you found a solution for this bug?, I need this method. Apparently it works well on an HTML page, but on Android nothing happens, nor does it show an error.
Confusing documentation / Wrong behavior
I added this library to my project and I found out that my audio file was not being played. I thought it was due to the file location and the "assetPath" variable, buy I realized it was caused by a "bug" in the .loop() method I was calling. I was expecting for the audio to reproduce with the loop call, but this was not the actual behavior. Its confusing and it does not correspond with the documentation:
/**
*/
NativeAudio.loop({
assetId: 'fire',
});
I would suggest calling the play() method in the AudioAsset.java file after setting the loop variable or fixing the documentation.
native-audio/android/src/main/java/com/getcapacitor/community/audio/AudioAsset.java
Line 105 in 8cfe67b
STR:
Expected behavior:
The audio file will be reproduced in loop mode.
Actual behavior:
Nothing happens after loop is invoked.
The text was updated successfully, but these errors were encountered: