hasVideo method

  1. @override
Future<bool> hasVideo()
override

Whether this composition includes any video frames.

Implementation

@override
Future<bool> hasVideo() async {
  final videoDetails = await Ffprobe.run(_videoPath!);
  return videoDetails.streams!.firstWhereOrNull((element) => (element.codecType ?? '') == 'video') != null;
}