takeVideo method
void
takeVideo(
- BuildContext context,
- AppModel app,
- AccessRightsProvider accessRightsProvider,
- MediumAvailable feedbackFunction,
- FeedbackProgress? feedbackProgress,
override
Implementation
@override
void takeVideo(
BuildContext context,
AppModel app,
AccessRightsProvider accessRightsProvider,
MediumAvailable feedbackFunction,
FeedbackProgress? feedbackProgress) {
var ownerId = AccessBloc.memberId(context);
if (ownerId == null) {
throw Exception("Expecting to have a member logged in to take a photo");
}
var memberMediumDocumentID = newRandomKey();
EliudCamera.openVideoRecorder(context, app, (video) async {
var memberMediumModel = await accessRightsProvider()
.getMediumHelper(app, ownerId)
.createThumbnailUploadVideoFile(memberMediumDocumentID, video.path,
feedbackProgress: feedbackProgress);
feedbackFunction(memberMediumModel);
}, (message) {
print('Error during takeVideo $message');
feedbackFunction(null);
});
}