Przeglądaj źródła

Merge branch 'feature/dev_Chris' into develop

Chris 5 lat temu
rodzic
commit
4ad80f3fed

+ 2 - 4
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -36,11 +36,9 @@ class BaseTabbarViewController: ESTabBarController {
         
         tabBarViewController.didHijackHandler = {
             tabbarController, viewController, index in
-//            let pickVc = KSMediaPickerController(maxVideoItemCount: 1, maxPictureItemCount: 9)
-//            tabbarController.present(pickVc, animated: true, completion: nil)
-            
             let pickVc = PublishViewController()
-            tabbarController.present(pickVc, animated: true, completion: nil)
+            let nav = BaseNavigationViewController.init(rootViewController: pickVc)
+            tabbarController.present(nav, animated: true, completion: nil)
         }
         
         /// 社区

+ 7 - 7
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoRecorderController.swift

@@ -16,6 +16,9 @@ class PublishVideoRecorderController: BaseViewController {
     typealias DismissClosure = () -> Void
     var dismissClosure: DismissClosure?
     
+    typealias EditClosure = () -> Void
+    var editClosure: EditClosure?
+    
     typealias HideSegmentClosure = (_ isHidden: Bool) -> Void
     var hideSegmentClosure: HideSegmentClosure?
     
@@ -145,8 +148,7 @@ class PublishVideoRecorderController: BaseViewController {
         //生成这次的存储路径
         let taskPath: String = recordDir.appending(AliyunPathManager.randomString())
         //视频存储路径
-        let videoSavePath: String = taskPath.appending(AliyunPathManager.randomString()).appending("mp4")
-        
+        let videoSavePath: String = taskPath.appending(AliyunPathManager.randomString()).appending(".mp4")
         
         let recorder = AliyunIRecorder.init(delegate: self, videoSize: CGSize(width: 720, height: 1280))
         
@@ -324,10 +326,8 @@ extension PublishVideoRecorderController {
     }
     
     func recordButtonFinishVideo() {
-        print("----partCount == \(clipManager?.partCount ?? 0)")
         if clipManager?.partCount ?? 0 >= 1 {
             recorder.finishRecording()
-            print("----调用结束录制")
         }
     }
     
@@ -403,6 +403,9 @@ extension PublishVideoRecorderController: AliyunIRecorderDelegate {
         UISaveVideoAtPathToSavedPhotosAlbum(outputPath, self, nil, nil)
         
         
+        if let editClosure = self.editClosure {
+            editClosure()
+        }
         
 //        [[AlivcShortVideoRoute shared]registerEditVideoPath:outputPath];
 //        [[AlivcShortVideoRoute shared]registerEditMediasPath:nil];
@@ -411,9 +414,6 @@ extension PublishVideoRecorderController: AliyunIRecorderDelegate {
 //        }else{
 //            [[AlivcShortVideoRoute shared] registerHasRecordMusic:NO];
 //        }
-//        UIViewController *editVC = [[AlivcShortVideoRoute shared]alivcViewControllerWithType:AlivcViewControlEdit];
-        
-//        [self.navigationController pushViewController:editVC animated:YES];
     }
     
     // 收到录制达到最大时长回调,调用完成录制

+ 5 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift

@@ -174,6 +174,11 @@ extension PublishViewController :JXSegmentedListContainerViewDataSource {
                 [weak self] in
                 self?.dismiss(animated: true, completion: nil)
             }
+            videoVc.editClosure = {
+                [weak self] in
+                let editVc = PublishEditController()
+                self?.navigationController?.pushViewController(editVc, animated: true)
+            }
             videoVc.hideSegmentClosure = {
                 [weak self] (isHidden) in
                 self?.segmentedView.isHidden = isHidden