getFFprobeSessions static method
Returns all FFprobe sessions in the session history.
Implementation
static Future<List<FFprobeSession>> getFFprobeSessions() 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 getFFprobeSessions error: ${e.message}");
return Future.error("getFFprobeSessions failed.", stack);
}
}