fromWithError static method

Future<MediaInformation> fromWithError(
  1. String ffprobeJsonOutput
)

Extracts MediaInformation from the given FFprobe json output.

Implementation

static Future<MediaInformation> fromWithError(
    String ffprobeJsonOutput) async {
  try {
    await FFmpegKitConfig.init();
    return _platform
        .mediaInformationJsonParserFromWithError(ffprobeJsonOutput)
        .then((properties) => new MediaInformation(properties));
  } on PlatformException catch (e, stack) {
    print("Plugin fromWithError error: ${e.message}");
    return Future.error("fromWithError failed.", stack);
  }
}