Browse Source

no message

Chris 5 years ago
parent
commit
57f43fe33a

+ 6 - 6
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -483,6 +483,7 @@
 		BD3AA45F22AE6F2500EF4F20 /* MessagePlanetTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3AA45E22AE6F2500EF4F20 /* MessagePlanetTableCell.swift */; };
 		BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */; };
 		BD4B50AE22BC815F0073B516 /* PublishFilterCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */; };
+		BD4B50B422BC8AD50073B516 /* AliyunPathManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BD4B50B322BC8AD50073B516 /* AliyunPathManager.m */; };
 		BD6EDF48229007EA009A20FE /* OrderApplyRefundModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6EDF47229007EA009A20FE /* OrderApplyRefundModel.swift */; };
 		BD7AB83622841A8B0030646A /* ShoppingCartPayOrderItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */; };
 		BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */; };
@@ -492,7 +493,6 @@
 		BD7AB841228438C80030646A /* OrderPaySelfPickAddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB840228438C80030646A /* OrderPaySelfPickAddressCell.swift */; };
 		BD7AB8432284390B0030646A /* OrderPaySelfPickInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8422284390B0030646A /* OrderPaySelfPickInfoCell.swift */; };
 		BD7AB8452284398A0030646A /* OrderPaySelfPickAddInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */; };
-		BD929CCA22B8CFB10098C139 /* AliyunPathManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BD929CC822B8CFB10098C139 /* AliyunPathManager.m */; };
 		BD929CCE22B904A30098C139 /* PublishViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD929CCD22B904A30098C139 /* PublishViewController.swift */; };
 		BDAA40F7228E947500CF841D /* OrderApplyRefundAccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */; };
 		BDAA40F9228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */; };
@@ -1052,6 +1052,8 @@
 		BD3AA45E22AE6F2500EF4F20 /* MessagePlanetTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePlanetTableCell.swift; sourceTree = "<group>"; };
 		BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FilterResource.bundle; sourceTree = "<group>"; };
 		BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishFilterCollectionCell.swift; sourceTree = "<group>"; };
+		BD4B50B222BC8AD50073B516 /* AliyunPathManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunPathManager.h; sourceTree = "<group>"; };
+		BD4B50B322BC8AD50073B516 /* AliyunPathManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunPathManager.m; sourceTree = "<group>"; };
 		BD6EDF47229007EA009A20FE /* OrderApplyRefundModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundModel.swift; sourceTree = "<group>"; };
 		BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderItemCell.swift; sourceTree = "<group>"; };
 		BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderHeader.swift; sourceTree = "<group>"; };
@@ -1062,8 +1064,6 @@
 		BD7AB8422284390B0030646A /* OrderPaySelfPickInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPaySelfPickInfoCell.swift; sourceTree = "<group>"; };
 		BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPaySelfPickAddInfoCell.swift; sourceTree = "<group>"; };
 		BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.debug.xcconfig"; sourceTree = "<group>"; };
-		BD929CC822B8CFB10098C139 /* AliyunPathManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunPathManager.m; sourceTree = "<group>"; };
-		BD929CC922B8CFB10098C139 /* AliyunPathManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunPathManager.h; sourceTree = "<group>"; };
 		BD929CCD22B904A30098C139 /* PublishViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishViewController.swift; sourceTree = "<group>"; };
 		BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundAccountCell.swift; sourceTree = "<group>"; };
 		BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundReasonCell.swift; sourceTree = "<group>"; };
@@ -3796,6 +3796,8 @@
 				BD01B1FF22BC677900CE9F36 /* PublishVideoView.swift */,
 				BD01B1FE22BC677900CE9F36 /* PublishFilterView.swift */,
 				BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */,
+				BD4B50B222BC8AD50073B516 /* AliyunPathManager.h */,
+				BD4B50B322BC8AD50073B516 /* AliyunPathManager.m */,
 			);
 			path = PublishTakeVideo;
 			sourceTree = "<group>";
@@ -4223,8 +4225,6 @@
 			isa = PBXGroup;
 			children = (
 				BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */,
-				BD929CC922B8CFB10098C139 /* AliyunPathManager.h */,
-				BD929CC822B8CFB10098C139 /* AliyunPathManager.m */,
 			);
 			path = ViewController;
 			sourceTree = "<group>";
@@ -4911,7 +4911,6 @@
 				A7C0FDF822B6671C00BC1E86 /* PopularVideoCollectionViewCell.swift in Sources */,
 				A7E19FA822BA2CDF009BCCE1 /* SearchProductListViewController.swift in Sources */,
 				BD4B50AE22BC815F0073B516 /* PublishFilterCollectionCell.swift in Sources */,
-				BD929CCA22B8CFB10098C139 /* AliyunPathManager.m in Sources */,
 				A7D5F23322BB9BE600F8E9AF /* CommunityMyInvitationViewController.swift in Sources */,
 				BD13B6C522BA034D008BB323 /* PublishEditAddAddressCell.swift in Sources */,
 				A7B4E71F228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift in Sources */,
@@ -4998,6 +4997,7 @@
 				A7CC74E222704429003C4F38 /* MineServiceCollectionViewCell.swift in Sources */,
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
 				A7CC74D6226FF421003C4F38 /* MineNavigationBarView.swift in Sources */,
+				BD4B50B422BC8AD50073B516 /* AliyunPathManager.m in Sources */,
 				BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */,
 				A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,

RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/AliyunPathManager.h → RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/AliyunPathManager.h


RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/AliyunPathManager.m → RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/AliyunPathManager.m


+ 28 - 25
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoRecorderController.swift

@@ -65,9 +65,6 @@ class PublishVideoRecorderController: BaseViewController {
         // 预览视图,必须设置
         recorder?.preview = videoCameraView.previewView
         
-        // 摄像头角度
-        recorder?.cameraRotate = 270;
-        
         /*
          视频的输出路径
          注意:若上一次录制的 outputPath 路径的视频存在沙盒里没有删除,并且与本次录制的视频路径且相同重名的话,录制将会失败
@@ -96,7 +93,7 @@ class PublishVideoRecorderController: BaseViewController {
         recorder?.frontCaptureSessionPreset = AVCaptureSession.Preset.hd1280x720.rawValue
         
         // 设置视频最大时长 默认8
-        recorder?.clipManager.maxDuration = 30;
+        recorder?.clipManager.maxDuration = 3;
         
         return recorder!
     }()
@@ -125,14 +122,17 @@ class PublishVideoRecorderController: BaseViewController {
                 
             case .confirm:
                 print("----点击-confirm")
+                self?.recordButtonFinishVideo()
             }
         }
         videoCameraView.videoClosure = {
             [weak self] (isRecording) in
             if isRecording == 0 {
                 print("----暂停录制视频")
+                self?.recordButtonPauseVideo()
             } else {
                 print("----开始录制视频")
+                self?.recordButtonRecordVideo()
             }
         }
         return videoCameraView
@@ -148,27 +148,6 @@ class PublishVideoRecorderController: BaseViewController {
         return filterView
     }()
     
-    
-    //    func recordButtonTouchesBegin {
-    //    // 点击录制button开始录制
-    //    [self.recorder startRecording];
-    //    }
-    //    func recordButtonTouchesEnd {
-    //    // 点击录制button停止录制
-    //    [self.recorder stopRecording];
-    //    }
-    //    func recorderDidStopRecording {
-    //    // 收到录制停止回调,调用完成录制
-    //    [self.recorder finishRecording];
-    //    }
-    //    func recorderDidStopWithMaxDuration {
-    //    // 收到录制达到最大时长回调,调用完成录制
-    //    [self.recorder finishRecording];
-    //    }
-    //    func recorderDidFinishRecording {
-    //    // 收到完成录制回调,视频已经保存到初始化设置的`视频输出沙盒路径`路径下
-    //    }
-    
 }
 
 // MARK: - Video
@@ -195,6 +174,30 @@ extension PublishVideoRecorderController {
         }
     }
     
+    // 点击录制button开始录制
+    func recordButtonRecordVideo() {
+        recorder.startRecording()
+    }
+    
+    // 点击录制button停止录制
+    func recordButtonPauseVideo() {
+        recorder.stopRecording()
+    }
+    
+    // 收到录制停止回调,调用完成录制
+    func recordButtonFinishVideo() {
+        recorder.finishRecording()
+    }
+    
+    func recorderDidStopWithMaxDuration() {
+        // 收到录制达到最大时长回调,调用完成录制
+        recorder.finishRecording()
+        print("----超时")
+    }
+    func recorderDidFinishRecording() {
+        // 收到完成录制回调,视频已经保存到初始化设置的`视频输出沙盒路径`路径下
+    }
+    
 }
 
 // MARK: - JXSegmentedDelegate