flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

[BUG]: how can i get the duration of audio without playing the audio ?

Open flutter-max opened this issue 3 years ago • 2 comments

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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


flutter-max avatar Aug 17 '21 06:08 flutter-max

You can get the duration as follows: _duration = await flutterSoundHelper.duration(file path or url here) ?? Duration.zero;

Faaatman avatar Aug 17 '21 18:08 Faaatman

@Faaatman I checked, on android its showing but in iOS its not working. getting blank info in ffmpeg duration. what could be the issue?

patelnirav48 avatar Jan 25 '22 11:01 patelnirav48

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.

github-actions[bot] avatar Dec 13 '23 01:12 github-actions[bot]