-
Notifications
You must be signed in to change notification settings - Fork 858
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
getDuration()
returns zero for Opus WebM codec
#1578
Comments
See #1255. Some codecs are not supported on every platform |
Hi @Gustl22 , |
On Chrome and Firefox, I can get the duration just fine: On Android, ineed, I don't get the duration, don't know if worth fixing, (or if it's even the fault of AudioPlayers). I'd rather work on an implementation of Exoplayer, see #1526 |
Alright. For now I chose to convert my audio files from WebM to a different format using a backend service, so this is no longer an issue for me. |
I leave it open, as it's a valid snd reproducible bug. We either resolve it directly or wait for the Exoplayer implementation. |
@putnokiabel Is that the only solution you found? I am recording audio from the web where OpusWebM is my only choice to save it, I am not able to get the duration of the audio as well! |
I haven't looked into other solutions since this one seemed to work for now. If converting to a different format is not an option because you need the files in WebM, you might consider using a web service or a different library to get the duration of the file (until this issue is fixed). |
Same issue here. Is there any package worth trying to convert webm to mp3? |
Checklist
Current bug behaviour
When calling
audioPlayer.getDuration()
with an audiofile that's encoded with an Opus WebM codec, the method returnsDuration.zero
.I've tested on both Android and on Chrome, both of which support the Opus WebM codec.
On both platforms, the audio playback with
audioplayers
works properly, just the duration is incorrect (it always returnsDuration.zero
).Expected behaviour
audioPlayer.getDuration()
returns the actual duration of the audio file.Steps to reproduce
Run code sample with example URL provided below.
Code sample
Code sample
Affected platforms
Android, Windows
Platform details
AudioPlayers Version
main
Build mode
Debug mode.
Audio Files/URLs/Sources
https://firebasestorage.googleapis.com/v0/b/obedience-app.appspot.com/o/audio%2F9f4edbb3-34a0-4146-b7f7-85cca3640a3b.opus?alt=media&token=feed7a95-1dcb-4e93-924e-645539d82cef
Logs
No relevant logs.
Flutter doctor:
Related issues / more information
No response
Working on PR
no way
The text was updated successfully, but these errors were encountered: