Chris 5 rokov pred
rodič
commit
909a64d7ae

+ 4 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/AlivcShortVideoRoute.h

@@ -134,6 +134,10 @@ typedef void (^AlivcCropFinishBlock)(NSString *outputPath);
  */
 - (void)registerEditFinishBlock:(AlivcEditFinishBlock )block;
 
+/**
+ 是否从裁剪Vc进入
+ */
+- (void)registerIsFromCropVc:(BOOL)isFromCropVc;
 
 
 #pragma mark - Crop 裁剪参数输入输出配置

+ 6 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/Common/AlivcShortVideoRoute.m

@@ -22,6 +22,7 @@
 @property (nonatomic, strong)NSString *editInputVideoPath;//编辑传入参数:单个视频的本地路径
 
 @property (nonatomic, assign)BOOL hasRecordMusic;//录制的时候是否带音乐
+@property (nonatomic, assign)BOOL isFromCropVc;//是否从裁剪进入
 
 @property (nonatomic, strong)NSString *editInputMediasPath;//编辑传入参数:多个媒体资源的本地存放文件夹路径
 
@@ -106,6 +107,7 @@ static AlivcShortVideoRoute *_instance = nil;
             }
             
             [controller setValue:@(self.hasRecordMusic) forKey:@"hasRecordMusic"];
+            [controller setValue:@(self.isFromCropVc) forKey:@"isFromCropVc"];
             
         }
             break;
@@ -211,6 +213,10 @@ static AlivcShortVideoRoute *_instance = nil;
     _hasRecordMusic = hasRecordMusic;
 }
 
+- (void)registerIsFromCropVc:(BOOL)isFromCropVc {
+    _isFromCropVc = isFromCropVc;
+}
+
 #pragma mark - other
 
 @end

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/Controller/AliyunCropViewController.m

@@ -413,6 +413,7 @@ typedef NS_ENUM(NSInteger, AliyunCropPlayerStatus) {
     [[AlivcShortVideoRoute shared] registerEditVideoPath:nil];
     [[AlivcShortVideoRoute shared] registerEditMediasPath:taskPath];
     [[AlivcShortVideoRoute shared] registerMediaConfig:_cutInfo];
+    [[AlivcShortVideoRoute shared] registerIsFromCropVc:YES];
     UIViewController *editVC = [[AlivcShortVideoRoute shared] alivcViewControllerWithType:AlivcViewControlEdit];
     dispatch_async(dispatch_get_main_queue(), ^{
         [self.navigationController pushViewController:editVC animated:YES];

+ 5 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.h

@@ -43,5 +43,10 @@
  */
 @property (nonatomic, assign) BOOL hasRecordMusic;
 
+/**
+ 是否从裁剪Vc进入
+ */
+@property (nonatomic, assign) BOOL isFromCropVc;
+
 
 @end

+ 6 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m

@@ -570,7 +570,12 @@ AliyunIExporterCallback, AliyunIPlayerCallback>
     [self.player stop];
     
     _config.outputSize = _inputOutputSize;
-    [self.navigationController popViewControllerAnimated:YES];
+    
+    if (_isFromCropVc) {
+        [self.navigationController popToRootViewControllerAnimated:YES];
+    } else {
+        [self.navigationController popViewControllerAnimated:YES];
+    }
 }
 
 /**

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m

@@ -1072,6 +1072,7 @@
         }else{
             [[AlivcShortVideoRoute shared]registerEditVideoPath:outputPath];
             [[AlivcShortVideoRoute shared]registerEditMediasPath:nil];
+            [[AlivcShortVideoRoute shared] registerIsFromCropVc:NO];
             if(self.curMusicUrl && ![self.curMusicUrl isEqualToString:@""]){
                 [[AlivcShortVideoRoute shared] registerHasRecordMusic:YES];
             }else{

+ 5 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicChooseView.swift

@@ -187,7 +187,8 @@ class PublishMusicChooseView: FWPopupView {
     //MARK: -
     //1.初始化JXSegmentedView
     lazy var segmentedView: JXSegmentedView = {
-        let segmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 48, width: kScreenWidth, height: 44))
+//        let segmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 48, width: kScreenWidth, height: 44))
+        let segmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 48, width: kScreenWidth, height: 44+100))
         segmentedView.delegate = self
         segmentedView.dataSource = segmentedDataSource
         segmentedView.indicators = [indicator]
@@ -235,7 +236,9 @@ class PublishMusicChooseView: FWPopupView {
         let listContainerView = JXSegmentedListContainerView(dataSource: self)
         listContainerView.didAppearPercent = 0.01
         listContainerView.defaultSelectedIndex = 0
-        listContainerView.frame = CGRect(x: 0, y: 48+44, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 103 - 114)
+//        listContainerView.frame = CGRect(x: 0, y: 48+44, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 103 - 114)
+        
+        listContainerView.frame = CGRect(x: 0, y: 48+44+100, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 103 - 114-100)
         return listContainerView
     }()