-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on playing my audio #158
Comments
Hi @hesham91fci , unfortunately parsing errors are outside of my control since the issue is with ExoPlayer itself (Google's media player library). You can post a bug report on Google's issues page and provide a link to the wav file that is triggering the issue: |
@ryanheise Thanks a lot for your immediate reply, but can you please demonstrate why AudioPlayer plugin plays this file normally ? |
Do you mean the |
@ryanheise , yes I mean AudioPlayer plugin, Does it means that falling back to versions earlier than 0.3.4 could be the fix ? |
You'd have to go back to 0.0.1. Not really a good option since the latest APIs are the most powerful. One thing you can try as a workaround is use a different audio recorder plugin. I haven't checked them all, but if you can find one that records and encodes in a different format, you might be able to dodge the parsing error when it comes time to play it. Looking at what's available, a number of them support recording to AAC which will probably work better for you as in addition to possibly fixing your parsing error, it will also compress the audio. |
Also another technical question, isn't just_audio plugin wraps inside it AudioPlayer plugin ? |
just_audio was written independently from the ground up using the latest APIs. As such, it has no relation to any other audio plugin on pub.dev. |
Same here. This report is just for record case. I generated the Wave file from https://github.com/rmbrone/flutter_audio_recorder/. In my case, the android mediaplayer seems to work well for the first time. Strange. Anyway, thanks for your all great work! 👍 👍 👍 👍 |
@dfdgsdfg what if you encode to a different audio format? |
@ryanheise In my case, the recorder generated a bad header. rmbrone/flutter_audio_recorder#11 I think, there is no problem with exoplayer or just_audio. Thanks. |
@dfdgsdfg I agree, thanks for investigating it. I'll close this issue, and recommend those who run into this issue to wait for a fix in the recorder plugin or switch to another recorder plugin that outputs the correct header. |
@ryanheise I switched the recorder plugin from flutter_audio_recorder to audio_recorder and it worked fine |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio. |
Which API doesn't behave as documented, and how does it misbehave?
setAsset, setURL, setFilePath all of them throws the same exception when playing some audio file recorded using flutterRecorder,
Minimal reproduction project
https://github.com/hesham91fci/just_audio
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
setAsset
methodplay()
to play the fileError messages
Expected behavior
Audio file should plays normally.
Screenshots
N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context
I've modified the original pubspec file as I'm using flutter 1.12.13.
The text was updated successfully, but these errors were encountered: