Browse Source

进入编辑流程

Chris 5 years ago
parent
commit
a440a64467
16 changed files with 2751 additions and 14 deletions
  1. 76 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 48 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.h
  3. 1556 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m
  4. 22 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemManager.h
  5. 122 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemManager.m
  6. 42 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemModel.h
  7. 22 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemModel.m
  8. 69 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.h
  9. 169 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.m
  10. 34 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Cover/AlivcCoverImageSelectedView.h
  11. 118 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Cover/AlivcCoverImageSelectedView.m
  12. 61 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.h
  13. 380 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.m
  14. 6 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.h
  15. 14 10
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m
  16. 12 4
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift

+ 76 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -401,6 +401,12 @@
 		BD01B20222BC677900CE9F36 /* PublishVideoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD01B1FF22BC677900CE9F36 /* PublishVideoView.swift */; };
 		BD09C84122955B480080D5A4 /* PopTopTriangleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD09C84022955B480080D5A4 /* PopTopTriangleView.swift */; };
 		BD0E678522A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0E678422A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift */; };
+		BD0FAA3722C465B900DDFB37 /* AliyunEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3522C465B900DDFB37 /* AliyunEditViewController.m */; };
+		BD0FAA4122C465F500DDFB37 /* AliyunEditButtonsView.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3A22C465F500DDFB37 /* AliyunEditButtonsView.m */; };
+		BD0FAA4222C465F500DDFB37 /* AliyunEffectTimeFilterView.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */; };
+		BD0FAA4322C465F500DDFB37 /* AlivcCoverImageSelectedView.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA3F22C465F500DDFB37 /* AlivcCoverImageSelectedView.m */; };
+		BD0FAA4922C4663100DDFB37 /* AlivcEditItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA4622C4663000DDFB37 /* AlivcEditItemModel.m */; };
+		BD0FAA4A22C4663100DDFB37 /* AlivcEditItemManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0FAA4822C4663100DDFB37 /* AlivcEditItemManager.m */; };
 		BD108C9322A60C2100837DAB /* HGImageCompleteButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD108C8E22A60C2100837DAB /* HGImageCompleteButton.swift */; };
 		BD108C9422A60C2100837DAB /* HGImageCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD108C8F22A60C2100837DAB /* HGImageCollectionViewController.swift */; };
 		BD108C9522A60C2100837DAB /* HGImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD108C9022A60C2100837DAB /* HGImageCollectionViewCell.swift */; };
@@ -1042,6 +1048,18 @@
 		BD01B1FF22BC677900CE9F36 /* PublishVideoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishVideoView.swift; sourceTree = "<group>"; };
 		BD09C84022955B480080D5A4 /* PopTopTriangleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PopTopTriangleView.swift; sourceTree = "<group>"; };
 		BD0E678422A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartOrderPayFreightCell.swift; sourceTree = "<group>"; };
+		BD0FAA3522C465B900DDFB37 /* AliyunEditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunEditViewController.m; sourceTree = "<group>"; };
+		BD0FAA3622C465B900DDFB37 /* AliyunEditViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunEditViewController.h; sourceTree = "<group>"; };
+		BD0FAA3922C465F500DDFB37 /* AliyunEditButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunEditButtonsView.h; sourceTree = "<group>"; };
+		BD0FAA3A22C465F500DDFB37 /* AliyunEditButtonsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunEditButtonsView.m; sourceTree = "<group>"; };
+		BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunEffectTimeFilterView.m; sourceTree = "<group>"; };
+		BD0FAA3D22C465F500DDFB37 /* AliyunEffectTimeFilterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunEffectTimeFilterView.h; sourceTree = "<group>"; };
+		BD0FAA3F22C465F500DDFB37 /* AlivcCoverImageSelectedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlivcCoverImageSelectedView.m; sourceTree = "<group>"; };
+		BD0FAA4022C465F500DDFB37 /* AlivcCoverImageSelectedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlivcCoverImageSelectedView.h; sourceTree = "<group>"; };
+		BD0FAA4522C4663000DDFB37 /* AlivcEditItemModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlivcEditItemModel.h; sourceTree = "<group>"; };
+		BD0FAA4622C4663000DDFB37 /* AlivcEditItemModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlivcEditItemModel.m; sourceTree = "<group>"; };
+		BD0FAA4722C4663000DDFB37 /* AlivcEditItemManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlivcEditItemManager.h; sourceTree = "<group>"; };
+		BD0FAA4822C4663100DDFB37 /* AlivcEditItemManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlivcEditItemManager.m; sourceTree = "<group>"; };
 		BD108C8E22A60C2100837DAB /* HGImageCompleteButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImageCompleteButton.swift; sourceTree = "<group>"; };
 		BD108C8F22A60C2100837DAB /* HGImageCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImageCollectionViewController.swift; sourceTree = "<group>"; };
 		BD108C9022A60C2100837DAB /* HGImageCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImageCollectionViewCell.swift; sourceTree = "<group>"; };
@@ -4076,6 +4094,55 @@
 			path = PublishTakeVideo;
 			sourceTree = "<group>";
 		};
+		BD0FAA3422C465B900DDFB37 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BD0FAA3622C465B900DDFB37 /* AliyunEditViewController.h */,
+				BD0FAA3522C465B900DDFB37 /* AliyunEditViewController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BD0FAA3822C465F500DDFB37 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BD0FAA3922C465F500DDFB37 /* AliyunEditButtonsView.h */,
+				BD0FAA3A22C465F500DDFB37 /* AliyunEditButtonsView.m */,
+				BD0FAA3B22C465F500DDFB37 /* Filter */,
+				BD0FAA3E22C465F500DDFB37 /* Cover */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		BD0FAA3B22C465F500DDFB37 /* Filter */ = {
+			isa = PBXGroup;
+			children = (
+				BD0FAA3D22C465F500DDFB37 /* AliyunEffectTimeFilterView.h */,
+				BD0FAA3C22C465F500DDFB37 /* AliyunEffectTimeFilterView.m */,
+			);
+			path = Filter;
+			sourceTree = "<group>";
+		};
+		BD0FAA3E22C465F500DDFB37 /* Cover */ = {
+			isa = PBXGroup;
+			children = (
+				BD0FAA4022C465F500DDFB37 /* AlivcCoverImageSelectedView.h */,
+				BD0FAA3F22C465F500DDFB37 /* AlivcCoverImageSelectedView.m */,
+			);
+			path = Cover;
+			sourceTree = "<group>";
+		};
+		BD0FAA4422C4661B00DDFB37 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				BD0FAA4722C4663000DDFB37 /* AlivcEditItemManager.h */,
+				BD0FAA4822C4663100DDFB37 /* AlivcEditItemManager.m */,
+				BD0FAA4522C4663000DDFB37 /* AlivcEditItemModel.h */,
+				BD0FAA4622C4663000DDFB37 /* AlivcEditItemModel.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
 		BD108C8D22A60A2000837DAB /* HGImagePicker */ = {
 			isa = PBXGroup;
 			children = (
@@ -4535,6 +4602,9 @@
 		BD61224F22C31EE400D3F513 /* VideoEdit */ = {
 			isa = PBXGroup;
 			children = (
+				BD0FAA3422C465B900DDFB37 /* Controller */,
+				BD0FAA3822C465F500DDFB37 /* View */,
+				BD0FAA4422C4661B00DDFB37 /* Model */,
 			);
 			path = VideoEdit;
 			sourceTree = "<group>";
@@ -5446,6 +5516,7 @@
 				A7A98DFF227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift in Sources */,
 				BD61227422C35A9500D3F513 /* AliyunImage.m in Sources */,
 				BDE376D922C22A260055E2EA /* UIColor+AlivcHelper.m in Sources */,
+				BD0FAA3722C465B900DDFB37 /* AliyunEditViewController.m in Sources */,
 				BDDF3B28228EBB72003A7D16 /* ProductRefundReasonModel.swift in Sources */,
 				BDD4FB1222840597006FE833 /* ShoppingCartPayOrderController.swift in Sources */,
 				BD12203A22AF80AD0051C7C2 /* MessageActivityTableCell.swift in Sources */,
@@ -5569,6 +5640,7 @@
 				BD12B69E22B4FAF000AEB10B /* KSMediaPickerNavigationView.swift in Sources */,
 				A70B2C4C228845E800B2449F /* ProductDetailParameterTableViewCell.swift in Sources */,
 				A7FF156A228C6E3600A85748 /* OrderProductTableViewCell.swift in Sources */,
+				BD0FAA4222C465F500DDFB37 /* AliyunEffectTimeFilterView.m in Sources */,
 				A7931DF022AF4C9100297D0A /* BaseBouncesContentView.swift in Sources */,
 				A7D5F21F22BB1FA800F8E9AF /* CommunityPlanetViewController.swift in Sources */,
 				A715333E22980CC60017C861 /* ConfigModel.swift in Sources */,
@@ -5703,6 +5775,7 @@
 				BD7AB8432284390B0030646A /* OrderPaySelfPickInfoCell.swift in Sources */,
 				A7D5F26522C118F100F8E9AF /* CMSMemberListModel.swift in Sources */,
 				BD1FC18622B09F9800D55081 /* CommunitySubCommentController.swift in Sources */,
+				BD0FAA4122C465F500DDFB37 /* AliyunEditButtonsView.m in Sources */,
 				BD6122AD22C3638300D3F513 /* AliyunEffectMusicInfo.m in Sources */,
 				A7C0FE0222B682DB00BC1E86 /* CommunityFeaturedTopicsHeaderView.swift in Sources */,
 				A7274C5F228EE636000E3A07 /* LBXScanWrapper.swift in Sources */,
@@ -5731,6 +5804,7 @@
 				A739121A229F75F50033177E /* JXPagingMainTableView.swift in Sources */,
 				A7CC7524227190FB003C4F38 /* AccountSecurityView.swift in Sources */,
 				A7931E1422AF9E4000297D0A /* TopicSelectionCollectionViewCell.swift in Sources */,
+				BD0FAA4922C4663100DDFB37 /* AlivcEditItemModel.m in Sources */,
 				BD1DC6CB228D157000B89C57 /* OrderCreateBackModel.swift in Sources */,
 				A72A72BD22321DE000B21995 /* Extension+UIColor.swift in Sources */,
 				A7FF1596228CFA8100A85748 /* OrderListViewController.swift in Sources */,
@@ -5742,6 +5816,7 @@
 				A7FF1564228C696B00A85748 /* OrderListView.swift in Sources */,
 				A70B2C072284305400B2449F /* ProductModel.swift in Sources */,
 				A72A72BC22321DE000B21995 /* Extension+UIAlertController.swift in Sources */,
+				BD0FAA4322C465F500DDFB37 /* AlivcCoverImageSelectedView.m in Sources */,
 				A7BB68662269B1DD00AB07A2 /* AddressPOIView.swift in Sources */,
 				BDF862A7228E42FA000DEF84 /* OrderApplyRefundController.swift in Sources */,
 				A7931E0422AF827600297D0A /* ESTabBar.swift in Sources */,
@@ -5803,6 +5878,7 @@
 				A74322A022B8D1F30017C367 /* MyFollowAndFanViewController.swift in Sources */,
 				BD2FCBE622B2586C0006D974 /* CommunityTagCollectionCell.swift in Sources */,
 				A743229422B88ED30017C367 /* EnumMacro.swift in Sources */,
+				BD0FAA4A22C4663100DDFB37 /* AlivcEditItemManager.m in Sources */,
 				BD1DC6C9228D005000B89C57 /* OrderCreateParameterModel.swift in Sources */,
 				A7BF203422B47E8600396DB3 /* CardContentActionTableViewCell.swift in Sources */,
 				A71AA52622732068008FF1A5 /* SwiftMoyaServiceConfigApi.swift in Sources */,

File diff suppressed because it is too large
+ 48 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.h


File diff suppressed because it is too large
+ 1556 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Controller/AliyunEditViewController.m


+ 22 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemManager.h

@@ -0,0 +1,22 @@
+//
+//  AlivcEditItemManager.h
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@class AlivcEditItemModel;
+@class AlivcEditUIConfig;
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AlivcEditItemManager : NSObject
+
++ (NSArray <AlivcEditItemModel*>*)defaultModelsWithUIConfig:(AlivcEditUIConfig *)uiConfig;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 122 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemManager.m

@@ -0,0 +1,122 @@
+//
+//  AlivcEditItemManager.m
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import "AlivcEditItemManager.h"
+#import "AlivcEditItemModel.h"
+#import "AlivcEditUIConfig.h"
+#import "AVC_ShortVideo_Config.h"
+#import "NSString+AlivcHelper.h"
+#import "AlivcDefine.h"
+#import "AlivcMacro.h"
+
+@implementation AlivcEditItemManager
++ (NSArray <AlivcEditItemModel*>*)defaultModelsWithUIConfig:(AlivcEditUIConfig *)uiConfig{
+    NSMutableArray *resultArray = [[NSMutableArray alloc]init];
+    NSInteger defaultAllValue = 10;
+    AlivcOutputProductType productType = kAlivcProductType;
+    if (productType == AlivcOutputProductTypeSmartVideo) {
+        defaultAllValue = 11;
+    }
+    for (NSInteger i = 0; i < defaultAllValue; i++) {
+        AlivcEditItemModel *model =[AlivcEditItemManager configModelsWithIndex:i withUIConfig:uiConfig];
+        if (model) {
+            [resultArray addObject:model];
+        }else{
+            NSLog(@"#Wrong:model can't be null");
+        }
+    }
+    return (NSArray *)resultArray;
+}
+
++ (AlivcEditItemModel *)configModelsWithIndex:(NSInteger)index withUIConfig:(AlivcEditUIConfig *)uiConfig{
+    AlivcEditItemModel *model = [[AlivcEditItemModel alloc]initWithType:index];
+    switch (model.itemType) {
+        case AliyunEditSouceClickTypeFilter:
+        {
+            model.title = [@"滤镜" localString];
+            model.showImage = uiConfig.filterImage;
+            model.selString = @"filterButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeMusic:
+        {
+            model.title = [@"音乐" localString];
+            model.showImage = uiConfig.musicImage;
+            model.selString = @"musicButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypePaster:
+        {
+            model.title = [@"动图" localString];
+            model.showImage = uiConfig.pasterImage;
+            model.selString = @"pasterButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeCaption:
+        {
+            model.title = [@"字幕" localString];
+            model.showImage = uiConfig.captionImage;
+            model.selString = @"subtitleButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeMV:
+        {
+            model.title = [@"MV" localString];
+            model.showImage = uiConfig.mvImage;
+            model.selString = @"mvButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeEffect:
+        {
+            model.title = [@"特效" localString];
+            model.showImage = uiConfig.effectImage;
+            model.selString = @"effectButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeTimeFilter:
+        {
+            model.title = [@"变速" localString];
+            model.showImage = uiConfig.timeImage;
+            model.selString = @"timeButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeTranslation:
+        {
+            model.title = [@"转场" localString];
+            model.showImage = uiConfig.translationImage;
+            model.selString = @"translationButtonCliked:";
+        }
+            break;
+        case AliyunEditSouceClickTypePaint:
+        {
+            model.title = [@"涂鸦" localString];
+            model.showImage = uiConfig.paintImage;
+            model.selString = @"paintButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeCover:
+        {
+            model.title = [@"封面" localString];
+            model.showImage = uiConfig.coverImage;
+            model.selString = @"coverButtonClicked:";
+        }
+            break;
+        case AliyunEditSouceClickTypeEffectSound:
+        {
+            model.title = [@"音效" localString];
+            model.showImage = uiConfig.soundImage;
+            model.selString = @"soundButtonClicked:";
+        }
+            break;
+        default:
+            return nil;
+    }
+    return model;
+}
+
+@end

+ 42 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemModel.h

@@ -0,0 +1,42 @@
+//
+//  AlivcEditItemModel.h
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+//编辑底部事件类型定义
+typedef NS_ENUM(NSInteger,AliyunEditSouceClickType){
+    AliyunEditSouceClickTypeFilter = 0,
+    AliyunEditSouceClickTypeMusic,
+    AliyunEditSouceClickTypePaster,
+    AliyunEditSouceClickTypeCaption,
+    AliyunEditSouceClickTypeMV,
+    AliyunEditSouceClickTypeEffectSound,
+    AliyunEditSouceClickTypeEffect,
+    AliyunEditSouceClickTypeTimeFilter,
+    AliyunEditSouceClickTypeTranslation,
+    AliyunEditSouceClickTypePaint,
+    AliyunEditSouceClickTypeCover
+};
+
+@interface AlivcEditItemModel : NSObject
+
+- (instancetype)initWithType:(AliyunEditSouceClickType)itemType;
+
+@property (strong, nonatomic) NSString *title;
+
+@property (strong, nonatomic) NSString *selString;
+
+@property (strong, nonatomic, nullable) UIImage *showImage;
+
+@property (assign, nonatomic, readonly) AliyunEditSouceClickType itemType;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 22 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/Model/AlivcEditItemModel.m

@@ -0,0 +1,22 @@
+//
+//  AlivcEditItemModel.m
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import "AlivcEditItemModel.h"
+
+@implementation AlivcEditItemModel
+
+- (instancetype)initWithType:(AliyunEditSouceClickType)itemType{
+    self = [super init];
+    if (self) {
+        _itemType = itemType;
+    }
+    return self;
+}
+
+
+@end

+ 69 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.h

@@ -0,0 +1,69 @@
+//
+//  AliyunEditButtonsView.h
+//  AliyunVideo
+//
+//  Created by Vienta on 2017/3/6.
+//  Copyright (C) 2010-2017 Alibaba Group Holding Limited. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class AlivcEditItemModel;
+
+//素材类别 1: 字体 2: 动图 3:imv 4:滤镜 5:音乐 6:字幕 7:动效滤镜
+typedef NS_ENUM(NSInteger, AliyunEditMaterialType) {
+    AliyunEditMaterialTypeFont      = 1,
+    AliyunEditMaterialTypePaster    = 2,
+    AliyunEditMaterialTypeMV        = 3,
+    AliyunEditMaterialTypeFilter    = 4,
+    AliyunEditMaterialTypeMusic     = 5,
+    AliyunEditMaterialTypeTime      = 6,
+};
+
+
+@protocol AliyunEditButtonsViewDelegate <NSObject>
+//滤镜
+- (void)filterButtonClicked:(AliyunEditMaterialType)type;
+
+//音乐
+- (void)musicButtonClicked;
+
+//动图
+- (void)pasterButtonClicked;
+
+//字幕
+- (void)subtitleButtonClicked;
+
+//MV
+- (void)mvButtonClicked:(AliyunEditMaterialType)type;
+
+//音效
+- (void)soundButtonClicked;
+
+//特效
+- (void)effectButtonClicked;
+
+//时间特效
+- (void)timeButtonClicked;
+
+//转场
+- (void)translationButtonCliked;
+
+//涂鸦
+- (void)paintButtonClicked;
+
+//封面选择
+- (void)coverButtonClicked;
+@end
+
+
+
+@interface AliyunEditButtonsView : UIView
+
+- (instancetype)initWithModels:(NSArray <AlivcEditItemModel *>*)models;
+
+@property (nonatomic, weak) id<AliyunEditButtonsViewDelegate> delegate;
+
+@end
+
+
+

+ 169 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/AliyunEditButtonsView.m

@@ -0,0 +1,169 @@
+//
+//  AliyunEditButtonsView.m
+//  AliyunVideo
+//
+//  Created by Vienta on 2017/3/6.
+//  Copyright (C) 2010-2017 Alibaba Group Holding Limited. All rights reserved.
+//
+
+#import "AliyunEditButtonsView.h"
+#import "AlivcEditItemModel.h"
+#import "AlivcMacro.h"
+
+@implementation AliyunEditButtonsView
+
+- (instancetype)initWithModels:(NSArray<AlivcEditItemModel *> *)models{
+    self = [super initWithFrame:CGRectMake(0, ScreenHeight - 70 - SafeBottom, ScreenWidth, 70)];
+    if(self){
+        [self addButtonsWithModels:models];
+        self.backgroundColor = [UIColor clearColor];
+    }
+    return self;
+}
+/**
+ 逻辑:在一个屏幕的宽度下,固定放5个半的图标,超出部分以滑动的形式显示
+ */
+- (void)addButtonsWithModels:(NSArray<AlivcEditItemModel *> *)models{
+    //滤镜 音乐 动图 字幕 MV 特效 时间特效 转场 涂鸦
+    AlivcEditItemModel *firstModel = models.firstObject;
+    
+    //2个按钮中心之间的间距
+    CGFloat devide = ScreenWidth / 5.5;
+    //基础参数
+    UIImage *image = firstModel.showImage;
+    CGFloat buttonWidth = image.size.width;
+    CGFloat labelHeight = 30;
+    CGFloat buttonHeight = buttonWidth + labelHeight;
+
+    //强制宽度等于屏幕宽
+    CGRect frame = self.frame;
+    if (frame.size.width != ScreenWidth) {
+        frame.size.width = ScreenWidth;
+        self.frame = frame;
+    }
+    //添加scrollView
+    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
+    scrollView.contentSize = CGSizeMake(devide * models.count, frame.size.height);
+    scrollView.showsHorizontalScrollIndicator = NO;
+    [self addSubview:scrollView];
+    
+    for (int idx = 0; idx < [models count]; idx++) {
+        AlivcEditItemModel *itemModel = models[idx];
+        UIImage *image = itemModel.showImage;
+        NSString *selName = itemModel.selString;
+        NSString *title = itemModel.title;
+        SEL sel = NSSelectorFromString(selName);
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.frame = CGRectMake(0, 0, buttonWidth, buttonHeight);
+        [btn addTarget:self action:sel forControlEvents:UIControlEventTouchUpInside];
+        
+        if(image){
+            [btn setImage:image forState:UIControlStateNormal];
+        }
+        
+        [btn setTitle:title forState:UIControlStateNormal];
+        [btn.titleLabel setFont:[UIFont systemFontOfSize:13]];
+        [btn.titleLabel sizeToFit];
+        
+        //
+        CGFloat titleHeight = btn.titleLabel.intrinsicContentSize.height;
+//        CGFloat titleWidth = btn.titleLabel.intrinsicContentSize.width;
+        CGFloat imageWidth = btn.imageView.frame.size.width;
+        CGFloat imageHeight = btn.imageView.frame.size.height;
+        btn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, titleHeight + 8, 0);
+        btn.titleEdgeInsets = UIEdgeInsetsMake(imageHeight + 8, -imageWidth, 0, 0);
+        [scrollView addSubview:btn];
+        btn.center = CGPointMake((idx+0.5) * devide, frame.size.height / 2);
+        //设置阴影
+        [btn setExclusiveTouch:YES];
+        btn.layer.shadowColor = [UIColor grayColor].CGColor;
+        btn.layer.shadowOpacity = 0.5;
+        btn.layer.shadowOffset = CGSizeMake(1, 1);
+        
+    }
+}
+
+//滤镜
+- (void)filterButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(filterButtonClicked:)]) {
+        [self.delegate filterButtonClicked:AliyunEditMaterialTypeFilter];
+    }
+    
+}
+
+//音乐
+- (void)musicButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(musicButtonClicked)]) {
+        [self.delegate musicButtonClicked];
+    }
+    
+}
+
+//动图
+- (void)pasterButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(pasterButtonClicked)]) {
+        [self.delegate pasterButtonClicked];
+    }
+   
+}
+
+//字幕
+- (void)subtitleButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(subtitleButtonClicked)]) {
+        [self.delegate subtitleButtonClicked];
+    }
+    
+}
+
+//mv
+- (void)mvButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(mvButtonClicked:)]) {
+        [self.delegate mvButtonClicked:AliyunEditMaterialTypeMV];
+    }
+    
+}
+
+//音效
+-(void)soundButtonClicked:(id)sender{
+    if (self.delegate && [self.delegate respondsToSelector:@selector(soundButtonClicked)]) {
+        [self.delegate soundButtonClicked];
+    }
+}
+
+//特效
+- (void)effectButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(effectButtonClicked)]) {
+        [self.delegate effectButtonClicked];
+    }
+    
+}
+
+//时间特效
+- (void)timeButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(timeButtonClicked)]) {
+        [self.delegate timeButtonClicked];
+    }
+}
+
+//转场
+- (void)translationButtonCliked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(translationButtonCliked)]) {
+        [self.delegate translationButtonCliked];
+    }
+   
+}
+
+//涂鸦
+- (void)paintButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(paintButtonClicked)]) {
+        [self.delegate paintButtonClicked];
+    }
+}
+
+//封面选择
+- (void)coverButtonClicked:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(coverButtonClicked)]) {
+        [self.delegate coverButtonClicked];
+    }
+}
+@end

+ 34 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Cover/AlivcCoverImageSelectedView.h

@@ -0,0 +1,34 @@
+//
+//  AlivcCoverImageSelectedView.h
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class AliyunTimelineView;
+@class AlivcCoverImageSelectedView;
+
+@protocol AlivcCoverImageSelectedViewDelegate <NSObject>
+
+- (void)cancelCoverImageSelectedView:(AlivcCoverImageSelectedView *)view;
+
+- (void)applyCoverImageSelectedView:(AlivcCoverImageSelectedView *)view;
+
+@end
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AlivcCoverImageSelectedView : UIView
+
+/**
+ 设置缩略图。frame自适应,不用设置frame
+ */
+@property (nonatomic, strong) AliyunTimelineView *timelineView;
+
+@property (nonatomic, weak) id <AlivcCoverImageSelectedViewDelegate> delegate;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 118 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Cover/AlivcCoverImageSelectedView.m

@@ -0,0 +1,118 @@
+//
+//  AlivcCoverImageSelectedView.m
+//  AliyunVideoClient_Entrance
+//
+//  Created by Zejian Cai on 2018/12/26.
+//  Copyright © 2018年 Alibaba. All rights reserved.
+//
+
+#import "AlivcCoverImageSelectedView.h"
+#import "AlivcEditBottomHeaderView.h"
+#import "AliyunTimelineView.h"
+#import "AlivcImage.h"
+#import "AlivcMacro.h"
+
+@interface AlivcCoverImageSelectedView ()
+/**
+ 占位view
+ */
+@property (nonatomic, strong) UIView *timeLinePalletView;
+
+@end
+
+@implementation AlivcCoverImageSelectedView
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+- (instancetype)init{
+    self = [self initWithFrame:CGRectZero];
+    if (self) {
+        
+    }
+    return self;
+}
+
+
+- (instancetype)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self configBaseUI];
+    }
+    return self;
+}
+
+- (void)configBaseUI{
+    [self addSubview:self.timeLinePalletView];
+    
+    AlivcEditBottomHeaderView *headerView = [[AlivcEditBottomHeaderView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), 45)];
+    
+    [headerView setTitle:@"封面" icon:[AlivcImage imageNamed:@"shortVideo_edit_timeFliter_coverImage"]];
+    [self addSubview:headerView];
+    __weak typeof(self)weakSelf = self;
+    [headerView bindingApplyOnClick:^{
+        [weakSelf apply];
+    } cancelOnClick:^{
+        [weakSelf noApply];
+    }];
+    
+    self.backgroundColor = [UIColor blackColor];
+}
+
+/**
+ 重写timelineView的set方法
+ 
+ @param timelineView 进度条
+ */
+-(void)setTimelineView:(AliyunTimelineView *)timelineView{
+    _timelineView = timelineView;
+    if (_timelineView) {
+        _timelineView.frame = CGRectMake(0, 15, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
+        _timelineView.backgroundColor = self.backgroundColor;
+        [_timeLinePalletView addSubview:_timelineView];
+    }
+}
+
+
+/**
+ 占位view的懒加载
+ 
+ @return 占位view
+ */
+- (UIView *)timeLinePalletView{
+    if (!_timeLinePalletView) {
+        _timeLinePalletView = [[UIView alloc]initWithFrame:CGRectMake(0, 44, ScreenWidth, 40)];
+        _timeLinePalletView.backgroundColor = [UIColor clearColor];
+        if (_timelineView) {
+            _timelineView.frame = CGRectMake(0, 5, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
+            _timelineView.backgroundColor = self.backgroundColor;
+            [_timeLinePalletView addSubview:_timelineView];
+        }
+    }
+    return _timeLinePalletView;
+}
+
+#pragma mark - Response
+/**
+ 点击应用的触发方法
+ */
+- (void)apply{
+    if ([self.delegate respondsToSelector:@selector(applyCoverImageSelectedView:)]) {
+        [self.delegate applyCoverImageSelectedView:self];
+    }
+}
+
+/**
+ 点击取消的触发方法
+ */
+- (void)noApply{
+    if ([self.delegate respondsToSelector:@selector(cancelCoverImageSelectedView:)]) {
+        [self.delegate cancelCoverImageSelectedView:self];
+    }
+}
+@end

+ 61 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.h

@@ -0,0 +1,61 @@
+//
+//  AliyunEffectTimeFilterView.h
+//  qusdk
+//
+//  Created by Vienta on 2018/2/26.
+//  Copyright © 2018年 Alibaba Group Holding Limited. All rights reserved.
+//  时间特效View
+
+#import <UIKit/UIKit.h>
+@class AliyunTimelineView;
+@protocol AliyunEffectTimeFilterDelegate <NSObject>
+/**
+ 应用时间特效的效果
+ */
+- (void)applyTimeFilterButtonClick;
+
+/**
+ 取消时间特效的效果
+ */
+- (void)noApplyTimeFilterButtonClick;
+
+/**
+ 时间特效选中无效果
+ */
+- (void)didSelectNone;
+
+/**
+ 时间特效瞬间变慢
+ */
+- (void)didSelectMomentSlow;
+
+/**
+ 时间特效瞬间变快
+ */
+- (void)didSelectMomentFast;
+
+/**
+ 反复
+ */
+- (void)didSelectRepeat;
+
+/**
+ 倒放
+ */
+- (void)didSelectInvert:(void (^)(BOOL success))success;
+
+@end
+
+@interface AliyunEffectTimeFilterView : UIView
+/**
+ 设置缩略图。frame自适应,不用设置frame
+ 
+ */
+@property (nonatomic, strong) AliyunTimelineView *timelineView;
+
+/**
+ 此类的代理属性
+ */
+@property (nonatomic, weak) id<AliyunEffectTimeFilterDelegate> delegate;
+
+@end

+ 380 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoEdit/View/Filter/AliyunEffectTimeFilterView.m

@@ -0,0 +1,380 @@
+//
+//  AliyunEffectTimeFilterView.m
+//  qusdk
+//
+//  Created by Vienta on 2018/2/26.
+//  Copyright © 2018年 Alibaba Group Holding Limited. All rights reserved.
+//
+
+#import "AliyunEffectTimeFilterView.h"
+#import "UIView+AlivcHelper.h"
+#import "AliyunTimelineView.h"
+#import "AlivcEditBottomHeaderView.h"
+#import "AlivcMacro.h"
+#import "AlivcImage.h"
+
+@interface AliyunEffectTimeFilterView()
+
+/**
+ 下选中的按钮
+ */
+@property(nonatomic, weak) UIButton *selectButton;
+
+/**
+ 提示语
+ */
+@property(nonatomic,weak) UILabel *tipLabel;
+
+
+/**
+ 应用时间特效按钮
+ */
+@property(nonatomic,weak) UIButton *applyButton;
+
+/**
+ 取消时间特效按钮
+ */
+@property(nonatomic,weak) UIButton *noApplyButton;
+/**
+ 占位view
+ */
+@property (nonatomic, strong) UIView *timeLinePalletView;
+/**
+ 首次提醒按钮
+ */
+@property(nonatomic,weak) UIButton *firstTipButton;
+
+/**
+ 保存状态的button
+ */
+@property(nonatomic,strong) UIButton *storeButton;
+
+/**
+ 无效果按钮
+ */
+@property(nonatomic,strong) UIButton *noneButton;
+
+/**
+ 无效果Label
+ */
+@property(nonatomic,strong) UILabel  *noneLabel;
+
+/**
+ 慢动作按钮
+ */
+@property(nonatomic,strong) UIButton *slowButton;
+
+/**
+ 慢动作Label
+ */
+@property(nonatomic,strong) UILabel  *slowLabel;
+
+/**
+ 加速按钮
+ */
+@property(nonatomic,strong) UIButton *fastButton;
+
+/**
+ 加速Label
+ */
+@property(nonatomic,strong) UILabel  *fastLabel;
+
+/**
+ 倒放按钮
+ */
+@property(nonatomic,strong) UIButton *backRunButton;
+
+/**
+ 倒放Label
+ */
+@property(nonatomic,strong) UILabel  *backRunLabel;
+/**
+ 反复按钮
+ */
+@property(nonatomic,strong) UIButton *repeatButton;
+/**
+ 反复Label
+*/
+@property(nonatomic,strong) UILabel  *repeatLabel;
+@end
+
+@implementation AliyunEffectTimeFilterView
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    if (self = [super initWithFrame:frame]) {
+        self.backgroundColor = [UIColor clearColor];
+        [self addSubViews];
+    }
+    return self;
+}
+
+/**
+ 添加子控件
+ */
+- (void)addSubViews {
+    [self addSubview:self.timeLinePalletView];
+    [self addVisualEffect];
+    UILabel *tipLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 117, 250, 12)];
+    tipLabel.text = @"点击添加效果";
+    tipLabel.font = [UIFont systemFontOfSize:12];
+    tipLabel.textColor = [UIColor whiteColor];
+    [self addSubview:tipLabel];
+    self.tipLabel = tipLabel;
+    
+    AlivcEditBottomHeaderView *headerView = [[AlivcEditBottomHeaderView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), 45)];
+    [headerView setTitle:@"变速" icon:[AlivcImage imageNamed:@"shortVideo_edit_timeFliter_nameButton"]];
+    [self addSubview:headerView];
+    __weak typeof(self)weakSelf = self;
+    [headerView bindingApplyOnClick:^{
+        [weakSelf apply];
+    } cancelOnClick:^{
+        [weakSelf noApply];
+    }];
+    
+    _noneButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    _slowButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    _fastButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    _repeatButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    _backRunButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    
+    NSArray *buttons = @[_noneButton, _repeatButton, _slowButton, _fastButton, _backRunButton];
+    NSArray *buttonNormalImages = @[@"transition_null_Nor",
+                                    @"shortVideo_edit_timeFliter_repeat",
+                                     @"shortVideo_edit_timeFliter_slow",
+                                     @"shortVideo_edit_timeFliter_fast",
+                                     @"shortVideo_edit_timeFliter_backRun"];
+    
+    
+    NSArray *buttonActions = @[@"noneButtonClicked:",
+                               @"repeatButtonClicked:",
+                               @"slowButtonClicked:",
+                               @"fastButtonClicked:",
+                               @"backrunButtonClicked:"];
+    
+    float dlt = (ScreenWidth - 40 - 50 * 5) / 4;
+    float centerY = 160;
+    
+    for (int i = 0; i < [buttons count]; i++) {
+        UIButton *btn = buttons[i];
+        btn.bounds = CGRectMake(0, 0, 50, 50);
+        btn.center = CGPointMake(45+i*(50+dlt), centerY);
+        btn.layer.masksToBounds = YES;
+        [btn setExclusiveTouch:YES];
+        btn.layer.cornerRadius = 25;
+        [btn setExclusiveTouch:YES];
+        [btn setImage:[AlivcImage imageNamed:buttonNormalImages[i]] forState:UIControlStateNormal];
+        [btn setImage:[AlivcImage imageNamed:@"shortVideo_edit_affirm"] forState:UIControlStateSelected];
+        btn.backgroundColor = rgba(255, 255, 255, 0.2);
+        SEL action = NSSelectorFromString(buttonActions[i]);
+        [btn addTarget:self action:action forControlEvents:UIControlEventTouchUpInside];
+        [self addSubview:btn];
+        if (i == 0) {
+            btn.selected = YES;
+            btn.backgroundColor = AlivcOxRGB(0x00c1de);
+            self.selectButton = btn;
+        }
+    }
+    
+    _noneLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
+    _slowLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
+    _fastLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
+    _repeatLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
+    _backRunLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
+    float labelCenterY = centerY + 35;
+    
+    NSArray *labels = @[_noneLabel, _slowLabel, _fastLabel, _repeatLabel, _backRunLabel];
+    NSArray *labelTitles = @[@"无效果", @"反复", @"慢动作", @"加速", @"倒放"];
+    for (int i = 0; i < [labels count]; i++) {
+        UILabel *label = labels[i];
+        label.center = CGPointMake(45+i*(50+dlt), labelCenterY);
+        [label setText:labelTitles[i]];
+        [label setTextAlignment:NSTextAlignmentCenter];
+        [label setTextColor:AlivcOxRGB(0xc3c5c6)];
+        [label setFont:[UIFont systemFontOfSize:12]];
+        [self addSubview:label];
+    }
+    UIButton *firstTip = [[UIButton alloc] initWithFrame:CGRectMake(20, 96, 57.0 + (50+dlt), 35)];
+    [firstTip setTitle:@"点击可添加效果" forState:UIControlStateNormal];
+    firstTip.titleEdgeInsets = UIEdgeInsetsMake(5, 0, 8, 0);
+    firstTip.titleLabel.font = [UIFont systemFontOfSize:14];
+    [firstTip setBackgroundImage:[self resizableImage:@"shortVideo_edit_firstTip"]  forState:UIControlStateNormal];
+    firstTip.hidden = YES;
+    [firstTip addTarget:self action:@selector(removeFirstTip) forControlEvents:UIControlEventTouchUpInside];
+    [self addSubview:firstTip];
+    self.firstTipButton = firstTip;
+    if (![[NSUserDefaults standardUserDefaults] integerForKey:@"timeFilterFirst"]) {
+        [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"timeFilterFirst"];
+        self.firstTipButton.hidden = NO;
+        self.tipLabel.hidden = YES;
+    }else{
+        self.firstTipButton.hidden = YES;
+        self.tipLabel.hidden = NO;
+    }
+}
+
+/**
+ 去除首次提醒,显示正常提醒
+ */
+- (void)removeFirstTip{
+    self.tipLabel.hidden = NO;
+    self.firstTipButton.hidden = YES;
+}
+/**
+ 从中间拉伸图片,不影响边缘效果
+ 
+ @param name 图片名称
+ @return 拉伸好的图片
+ */
+- (UIImage *)resizableImage:(NSString *)name
+{
+    UIImage *image = [AlivcImage imageNamed:name];
+    return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
+}
+
+
+/**
+ 点击应用的触发方法
+ */
+- (void)apply{
+    self.storeButton = self.selectButton;
+    if (_delegate) {
+        [self removeFirstTip];
+        [_delegate applyTimeFilterButtonClick];
+    }
+}
+
+/**
+ 点击取消的触发方法
+ */
+- (void)noApply{
+    if (_delegate) {
+        if (self.storeButton) {
+            [self buttonSelected:self.storeButton];
+        }else{
+            [self buttonSelected:_noneButton];
+        }
+        [_delegate noApplyTimeFilterButtonClick];
+    }
+}
+
+/**
+ 点击无效果的触发方法
+
+ @param sender 无效果按钮
+ */
+- (void)noneButtonClicked:(id)sender
+{
+    [_delegate didSelectNone];
+    [self buttonSelected:sender];
+}
+
+
+/**
+ 点击慢动作按钮的触发方法
+
+ @param sender 慢动作按钮
+ */
+- (void)slowButtonClicked:(id)sender
+{
+    [self buttonSelected:sender];
+    [_delegate didSelectMomentSlow];
+    
+}
+
+
+/**
+ 点击加速按钮的触发方法
+
+ @param sender 加速按钮
+ */
+- (void)fastButtonClicked:(id)sender
+{
+    
+    [self buttonSelected:sender];
+    
+    [_delegate didSelectMomentFast];
+    
+}
+
+
+/**
+ 点击重复按钮的触发方法
+
+ @param sender 重复按钮
+ */
+- (void)repeatButtonClicked:(id)sender
+{
+    [self buttonSelected:sender];
+    [_delegate didSelectRepeat];
+}
+
+
+/**
+ 点击倒放按钮的触发方法
+
+ @param sender 倒放按钮
+ */
+- (void)backrunButtonClicked:(id)sender
+{
+    if (self.selectButton == sender) {
+        return;
+    }
+    UIButton *lastBtn = self.selectButton;
+    [self buttonSelected:sender];
+    [_delegate didSelectInvert:^(BOOL success) {
+        if (!success) {
+            [self buttonSelected:lastBtn];
+        }
+    }];
+}
+
+/**
+ 功能按钮的点击处理
+
+ @param button 功能按钮
+ */
+- (void)buttonSelected:(UIButton *)button {
+   
+    self.selectButton.selected = NO;
+    self.selectButton.backgroundColor = rgba(255, 255, 255, 0.2);
+    self.selectButton = button;
+    self.selectButton.selected = YES;
+    self.selectButton.backgroundColor = AlivcOxRGB(0x00c1de);
+    [self removeFirstTip];
+}
+
+
+/**
+ 重写timelineView的set方法
+
+ @param timelineView 进度条
+ */
+-(void)setTimelineView:(AliyunTimelineView *)timelineView{
+    _timelineView = timelineView;
+    if (_timelineView) {
+        _timelineView.frame = CGRectMake(0, 15, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
+        _timelineView.backgroundColor = self.backgroundColor;
+        [_timeLinePalletView addSubview:_timelineView];
+    }
+}
+
+
+/**
+ 占位view的懒加载
+
+ @return 占位view
+ */
+- (UIView *)timeLinePalletView{
+    if (!_timeLinePalletView) {
+        _timeLinePalletView = [[UIView alloc]initWithFrame:CGRectMake(0, 44, ScreenWidth, 40)];
+        _timeLinePalletView.backgroundColor = [UIColor clearColor];
+        if (_timelineView) {
+            _timelineView.frame = CGRectMake(0, 5, CGRectGetWidth(_timeLinePalletView.frame), CGRectGetHeight(_timeLinePalletView.frame)-10);
+            _timelineView.backgroundColor = self.backgroundColor;
+            [_timeLinePalletView addSubview:_timelineView];
+        }
+    }
+    return _timeLinePalletView;
+}
+@end

+ 6 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.h

@@ -28,5 +28,11 @@
  */
 @property (nonatomic, copy, nullable) AlivcRecordFinishBlock finishBlock;
 
+// 返回block
+@property (nonatomic, copy, nullable) void (^dismissBlock)(void);
+
+// 跳转至编辑block
+@property (nonatomic, copy, nullable) void (^editBlock)(void);
+
 @end
 

+ 14 - 10
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoRecord/Controller/AliyunMagicCameraViewController.m

@@ -706,7 +706,7 @@
     }
 }
 
-- (void)recordButtonPauseVideo{
+- (void)recordButtonPauseVideo {
     NSLog(@"---------->点击了暂停录制按钮");
     [_recorder stopRecording];
     _magicCameraView.userInteractionEnabled =NO;
@@ -714,21 +714,22 @@
     _magicCameraView.hide = NO;
 }
 
-- (void)recordButtonFinishVideo{
+- (void)recordButtonFinishVideo {
     [self stopPreview];
     _quVideo.videoRotate = [_clipManager firstClipVideoRotation];
     [_recorder finishRecording];
     _magicCameraView.hide = NO;
 }
 
-- (void)backButtonClicked
-{
+- (void)backButtonClicked {
     [self stopPreview];
-    [self.navigationController popViewControllerAnimated:YES];
+    
+    if (self.dismissBlock) {
+        self.dismissBlock();
+    }
 }
 
-- (void)cameraIdButtonClicked
-{
+- (void)cameraIdButtonClicked {
     if (self.magicCameraView.backButton.enabled == NO) {
         return;
     }
@@ -993,9 +994,12 @@
             }else{
                  [[AlivcShortVideoRoute shared] registerHasRecordMusic:NO];
             }
-            UIViewController *editVC = [[AlivcShortVideoRoute shared]alivcViewControllerWithType:AlivcViewControlEdit];
-          
-            [self.navigationController pushViewController:editVC animated:YES];
+            
+            if (self.editBlock) {
+                self.editBlock();
+            }
+//            UIViewController *editVC = [[AlivcShortVideoRoute shared]alivcViewControllerWithType:AlivcViewControlEdit];
+//            [self.navigationController pushViewController:editVC animated:YES];
         }
      
     }

+ 12 - 4
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift

@@ -15,8 +15,8 @@ class PublishViewController: BaseViewController {
     var mediaConfig: AliyunMediaConfig {
         //默认配置
         let mediaConfig = AliyunMediaConfig.default()
-        mediaConfig?.minDuration = 2.0
-        mediaConfig?.maxDuration = 10.0 * 60
+        mediaConfig?.minDuration = 3.0
+        mediaConfig?.maxDuration = 60.0
         mediaConfig?.fps = 25
         mediaConfig?.gop = 5
         mediaConfig?.cutMode = AliyunMediaCutMode.scaleAspectFill
@@ -38,8 +38,7 @@ class PublishViewController: BaseViewController {
 
     }
     
-    override func setupLayouts() {
-        
+    override func setupLayouts() {        
         listContainerView.snp.makeConstraints { (make) in
             make.top.left.right.equalToSuperview()
             make.bottom.equalToSuperview()
@@ -185,6 +184,15 @@ extension PublishViewController :JXSegmentedListContainerViewDataSource {
         case 1:
             let videoVc = AliyunMagicCameraViewController()
             videoVc.quVideo = mediaConfig
+            videoVc.dismissBlock = {
+                [weak self] in
+                self?.dismiss(animated: true, completion: nil)
+            }
+            videoVc.editBlock = {
+                [weak self] in
+                let editVc = AlivcShortVideoRoute.shared().alivcViewController(with: AlivcViewControlType.edit)
+                self?.navigationController?.pushViewController(editVc, animated: true)
+            }
             return videoVc
             
 //            let videoVc = PublishVideoRecorderController()