Skip to content

Commit

Permalink
[camera] Solves delay when using the zoom feature on iOS. (flutter#3562)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom authored and adsonpleal committed Feb 26, 2021
1 parent 04138e2 commit 475fc8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.0-nullsafety.2

* Solved delay when using the zoom feature on iOS.

## 0.8.0-nullsafety.1

* Added a timeout to the pre-capture sequence on Android to prevent crashes when the camera cannot get a focus.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/ios/Classes/CameraPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ - (void)setZoomLevel:(CGFloat)zoom Result:(FlutterResult)result {
result(getFlutterError(error));
return;
}
[_captureDevice rampToVideoZoomFactor:zoom withRate:1];
_captureDevice.videoZoomFactor = zoom;
[_captureDevice unlockForConfiguration];

result(nil);
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.8.0-nullsafety.1
version: 0.8.0-nullsafety.2
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera

dependencies:
Expand Down

0 comments on commit 475fc8e

Please sign in to comment.