flutter_sound
flutter_sound copied to clipboard
[BUG]: how can i get the duration of audio without playing the audio ?
Flutter Sound Version :
-
FULL or LITE flavor ?
-
Important: Result of the command :
flutter pub deps | grep flutter_sound
Severity
-
Crash ?
-
Result is not what expected ?
-
Cannot build my App ?
-
Minor issue ?
Platforms you faced the error
-
iOS ?
-
Android ?
-
Flutter Web ?
-
Emulator ?
-
Real device ?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Logs!!!!
(This is very important. Most of the time we cannot do anything if we do not have information on your bug).
To activate the logs, you must instantiate your modules with the Log Level set to Level.debug
:
FlutterSoundPlayer myPlayer = FlutterSoundPlayer(logLevel: Level.debug);
FlutterSoundRecorder myRecorder = FlutterSoundRecorder(logLevel: Level.debug);
See this
You can get the duration as follows:
_duration = await flutterSoundHelper.duration(file path or url here) ?? Duration.zero;
@Faaatman I checked, on android its showing but in iOS its not working. getting blank info in ffmpeg duration. what could be the issue?
This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.