flutter_sound: [BUG]: Duration null for remote audio file

Flutter Sound Version :

  • FULL or LITE flavor ? Full

  • Important: Result of the command : flutter pub deps | grep flutter_sound |-- flutter_sound 7.5.3+1 | |-- flutter_sound_platform_interface 7.5.3+1 | |-- flutter_sound_web 7.5.3+1 | | |-- flutter_sound_platform_interface…

Severity

  • Result is not what expected

  • iOS/Android emulator and real device (I haven’t tried it in web)

Your problem

Describe the bug

[BUG]: Duration null for remote audio file (i.e. https://xxx/flutter_sound_yyy.aac)

To Reproduce Steps to reproduce the behavior:

  1. Invoke await flutterSoundHelper.duration(‘https://xxx/flutter_sound_yyy.aac’)

Logs!!!

D/flutter-ffmpeg( 2759): Getting media information for https://xxx/flutter_sound_yyy.aac. I/mobile-ffmpeg( 2759): https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled. I/mobile-ffmpeg( 2759): https://xxx/flutter_sound_yyy.aac: Protocol not found

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31

Most upvoted comments

Incredible, thanks for the quick turnaround and maintaining this library!

Is there a sponsor link?

Actually I am fighting with terrible asynchronous problems. The way τ handle asynchronous events is not good. But τ is at the middle of an App which does anythings and an OS which does what it wants.

Asynchronous processing is very very hard to handle correctely and need many tests before release. And even after many tests, I will not be sure that Flutter Sound users will not have problems.

@Larpoux

FYI.

I added flutter_ffmpeg: ^0.3.0 as dependency and tried the following and it worked:

MediaInformation info = await FlutterFFprobe().getMediaInformation('https://xxx/flutter_sound_yyy.aac');
Map<dynamic, dynamic> mediaProperties = info.getMediaProperties();
double seconds = double.parse(mediaProperties['duration']);