Reputation: 11
I'm working on a Flutter web app that uses the Media Kit Player package for video playback. I want to add functionality to take screenshots of the video at any point. Here's what I've tried so far:
My questions are:
Upvotes: 1
Views: 41
Reputation: 20098
To take a screenshot of a video, you can use the screenshot package:
Screenshot
widget:Screenshot(
controller: screenshotController,
child: Text("This text will be captured as image"),
),
.capture
on your Screenshot
controller:
screenshotController.capture().then((Uint8List image) {
//Capture Done
setState(() {
_imageFile = image;
});
}).catchError((onError) {
print(onError);
});
Upvotes: 0