listFFprobeSessions static method
Lists all FFprobe sessions in the session history.
Implementation
static Future<List<FFprobeSession>> listFFprobeSessions() async {
try {
await FFmpegKitConfig.init();
return _platform.ffprobeKitListFFprobeSessions().then((sessions) {
if (sessions == null) {
return List.empty();
} else {
return sessions
.map((dynamic sessionObject) => FFmpegKitFactory.mapToSession(
sessionObject as Map<dynamic, dynamic>))
.map((session) => session as FFprobeSession)
.toList();
}
});
} on PlatformException catch (e, stack) {
print("Plugin listFFprobeSessions error: ${e.message}");
return Future.error("listFFprobeSessions failed.", stack);
}
}