cancel static method

Future<void> cancel([
  1. int? sessionId = null
])

Cancels the session specified with sessionId.

Implementation

static Future<void> cancel([int? sessionId = null]) async {
  try {
    await FFmpegKitConfig.init();
    if (sessionId == null) {
      return _platform.ffmpegKitCancel();
    } else {
      return _platform.ffmpegKitCancelSession(sessionId);
    }
  } on PlatformException catch (e, stack) {
    print("Plugin cancel error: ${e.message}");
    return Future.error("cancel failed.", stack);
  }
}