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
{{ message }}
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
If this is still relevant, a folder entry under the assets block must end with a forward slash. For example:
# correct
assets:
- assets/audio/
And not
# incorrect
assets:
- assets/audio
More importantly, note that this question is posted under the audioplayer package, when your code appears to be using a different package called audioplayers
In Android: if file name is note1.wav,you can try
1:change [ player.play('audio/note1.wav')] to [player.play('flutter_assets/audio/note1.wav')].
2:change ··mediaPlayer.setDataSource(url);··to ·· AssetFileDescriptor fd = activity.getAssets().openFd(url);
mediaPlayer.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength());··
i have no idea in iOS.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to play local files in my xylophone app but it keeps throwing this error and doesn't play any note.
Error:
main.dart:
And pubsec.yaml:
Please provide detailed answers and helpful solutions.
The text was updated successfully, but these errors were encountered: