lxy 1 년 전
부모
커밋
6e930b6a2d
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

+ 9 - 1
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -998,7 +998,9 @@
     }
 
     AVCaptureConnection *connection = [self.photoOutput connectionWithMediaType:AVMediaTypeVideo];
-    
+    if ([connection isVideoStabilizationSupported]) {
+        connection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeAuto;
+    }
     if(connection == nil){
 //        [self showAlertForAuthorization];
         return;
@@ -1195,6 +1197,9 @@
     
     NSURL* tmpMovieFileUrl = [NSURL fileURLWithPath:[LenzDataManager moviePath]];
     AVCaptureConnection* connection = [self.movieFileOutput connectionWithMediaType:AVMediaTypeVideo];
+    if ([connection isVideoStabilizationSupported]) {
+        connection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeAuto;
+    }
     if(connection == nil){
 //        [self showAlertForAuthorization];
         return NO;
@@ -1272,6 +1277,9 @@
         }
         if([self configureVideoWritter]){
             AVCaptureConnection *connection = [self.videoDataOutput connectionWithMediaType:AVMediaTypeVideo];
+            if ([connection isVideoStabilizationSupported]) {
+                connection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeAuto;
+            }
             if(connection == nil){
 //                [self showAlertForAuthorization];
                 return;