isFFmpegAvailable method

Future<bool> isFFmpegAvailable()

To know during runtime if FFmpeg is linked with the App.

returns true if FFmpeg is available (probably the FULL version of Flutter Sound)

Implementation

Future<bool> isFFmpegAvailable() async {
  if (kIsWeb) return false;
  if (_flutterFFmpegConfig == null) {
    _flutterFFmpegConfig = FlutterSoundFFmpegConfig(logger);
    //await _flutterFFmpegConfig!.disableLogs(); // TODO
    //await _flutterFFmpegConfig!.disableRedirection(); // TODO
    var version = await _flutterFFmpegConfig!.getFFmpegVersion();
    var platform = await _flutterFFmpegConfig!.getPlatform();
    _ffmpegAvailable = (version != null && platform != null);
  }
  return _ffmpegAvailable;
}