getMediaInfo method
get media information from path
get media information from path
return Future<MediaInfo>
example
final info = await _flutterVideoCompress.getMediaInfo(file.path);
debugPrint(info.toJson());
Implementation
Future<MediaInfo> getMediaInfo(String path) async {
// Not to set the result as strong-mode so that it would have exception to
// lead to the failure of compression
final jsonStr = await (_invoke<String>('getMediaInfo', {'path': path}));
final jsonMap = json.decode(jsonStr!);
return MediaInfo.fromJson(jsonMap);
}