浏览代码

Merge branch 'demo'

* demo:
  修改合成页的预览逻辑
  fix plist
  配置 修改许可声明
  添加图标

# Conflicts:
#	Introduce.xcodeproj/project.pbxproj
harry 3 年之前
父节点
当前提交
a522e8c18b
共有 36 个文件被更改,包括 222 次插入36 次删除
  1. 12 14
      Introduce.xcodeproj/project.pbxproj
  2. 4 0
      Introduce/Aarchitecture/AppDelegate.swift
  3. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/1024x1024px.png
  4. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/120x120px-1.png
  5. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/120x120px.png
  6. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/152x152px.png
  7. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/167x167px.png
  8. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/180x180px.png
  9. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/20x20px.png
  10. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/29x29px.png
  11. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/40x40px-1.png
  12. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/40x40px-2.png
  13. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/40x40px.png
  14. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/58_58px-1.png
  15. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/58_58px.png
  16. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/60x60px.png
  17. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/76x76px.png
  18. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/80x80px-1.png
  19. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/80x80px.png
  20. 二进制
      Introduce/Assets.xcassets/AppIcon.appiconset/87x87px.png
  21. 18 0
      Introduce/Assets.xcassets/AppIcon.appiconset/Contents.json
  22. 126 0
      Introduce/Assets.xcassets/LaunchImage.launchimage/Contents.json
  23. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-1.png
  24. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-2.png
  25. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-3.png
  26. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-4.png
  27. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-5.png
  28. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-6.png
  29. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-7.png
  30. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-8.png
  31. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-9.png
  32. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-2.png
  33. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-3.png
  34. 二进制
      Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-5.png
  35. 0 12
      Introduce/Info.plist
  36. 62 10
      Introduce/Record/INVideoExportController.swift

+ 12 - 14
Introduce.xcodeproj/project.pbxproj

@@ -3,11 +3,10 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 51;
+	objectVersion = 55;
 	objects = {
 
 /* Begin PBXBuildFile section */
-		419CF3B7276111DC00C73BDA /* Resources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 419CF3B6276111DC00C73BDA /* Resources.bundle */; };
 		4A426DDD275484DF00B3733B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A426DDC275484DF00B3733B /* AppDelegate.swift */; };
 		4A426DE4275484DF00B3733B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A426DE2275484DF00B3733B /* Main.storyboard */; };
 		4A426DE6275484E000B3733B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4A426DE5275484E000B3733B /* Assets.xcassets */; };
@@ -23,7 +22,6 @@
 /* Begin PBXFileReference section */
 		3051DB0957784182F3E1AAD3 /* Pods-Introduce.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Introduce.release.xcconfig"; path = "Target Support Files/Pods-Introduce/Pods-Introduce.release.xcconfig"; sourceTree = "<group>"; };
 		3D67E85C017389B87957100F /* Pods_Introduce.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Introduce.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		419CF3B6276111DC00C73BDA /* Resources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Resources.bundle; sourceTree = "<group>"; };
 		4A426DD9275484DF00B3733B /* Introduce.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Introduce.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		4A426DDC275484DF00B3733B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		4A426DE3275484DF00B3733B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -94,7 +92,6 @@
 		4A426DF02754A0D100B3733B /* Aarchitecture */ = {
 			isa = PBXGroup;
 			children = (
-				419CF3B6276111DC00C73BDA /* Resources.bundle */,
 				4A426DDC275484DF00B3733B /* AppDelegate.swift */,
 				4A426DF12754A1E300B3733B /* INTabbarController.swift */,
 			);
@@ -173,7 +170,7 @@
 				};
 			};
 			buildConfigurationList = 4A426DD4275484DF00B3733B /* Build configuration list for PBXProject "Introduce" */;
-			compatibilityVersion = "Xcode 9.3";
+			compatibilityVersion = "Xcode 13.0";
 			developmentRegion = en;
 			hasScannedForEncodings = 0;
 			knownRegions = (
@@ -198,7 +195,6 @@
 				4A426DE9275484E000B3733B /* LaunchScreen.storyboard in Resources */,
 				4A426DE6275484E000B3733B /* Assets.xcassets in Resources */,
 				4A426DE4275484DF00B3733B /* Main.storyboard in Resources */,
-				419CF3B7276111DC00C73BDA /* Resources.bundle in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -422,16 +418,17 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 0.5;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
 				EXCLUDED_ARCHS = "";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Introduce/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "开讲";
-				INFOPLIST_KEY_NSMicrophoneUsageDescription = "请点击允许以便录制声音";
-				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "请允许访问相册以便保存视频";
-				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "请允许访问相册以便选择视频";
+				INFOPLIST_KEY_NSCameraUsageDescription = "请点击\"允许\"以允许访问,以便于反馈,上传头像等功能图片上传";
+				INFOPLIST_KEY_NSMicrophoneUsageDescription = "请点击\"允许\"以允许访问,以便于使用视频制作功能";
+				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "请点击\"允许\"以允许访问,以便于图片保存";
+				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "请点击\"允许\"以允许访问,以便于反馈,上传头像等功能图片上传";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UIMainStoryboardFile = Main;
@@ -459,16 +456,17 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 0.5;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
 				EXCLUDED_ARCHS = "";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Introduce/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "开讲";
-				INFOPLIST_KEY_NSMicrophoneUsageDescription = "请点击允许以便录制声音";
-				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "请允许访问相册以便保存视频";
-				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "请允许访问相册以便选择视频";
+				INFOPLIST_KEY_NSCameraUsageDescription = "请点击\"允许\"以允许访问,以便于反馈,上传头像等功能图片上传";
+				INFOPLIST_KEY_NSMicrophoneUsageDescription = "请点击\"允许\"以允许访问,以便于使用视频制作功能";
+				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "请点击\"允许\"以允许访问,以便于图片保存";
+				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "请点击\"允许\"以允许访问,以便于反馈,上传头像等功能图片上传";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UIMainStoryboardFile = Main;

+ 4 - 0
Introduce/Aarchitecture/AppDelegate.swift

@@ -40,6 +40,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     func applicationDidEnterBackground(_ application: UIApplication) {
         
     }
+    
+    func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
+        return UIInterfaceOrientationMask.portrait
+    }
 
 }
 

二进制
Introduce/Assets.xcassets/AppIcon.appiconset/1024x1024px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/120x120px-1.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/120x120px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/152x152px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/167x167px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/180x180px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/20x20px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/29x29px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/40x40px-1.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/40x40px-2.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/40x40px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/58_58px-1.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/58_58px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/60x60px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/76x76px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/80x80px-1.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/80x80px.png


二进制
Introduce/Assets.xcassets/AppIcon.appiconset/87x87px.png


+ 18 - 0
Introduce/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,91 +1,109 @@
 {
   "images" : [
     {
+      "filename" : "40x40px.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "20x20"
     },
     {
+      "filename" : "60x60px.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "20x20"
     },
     {
+      "filename" : "58_58px.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "29x29"
     },
     {
+      "filename" : "87x87px.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "29x29"
     },
     {
+      "filename" : "80x80px.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "40x40"
     },
     {
+      "filename" : "120x120px.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "40x40"
     },
     {
+      "filename" : "120x120px-1.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "60x60"
     },
     {
+      "filename" : "180x180px.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "60x60"
     },
     {
+      "filename" : "20x20px.png",
       "idiom" : "ipad",
       "scale" : "1x",
       "size" : "20x20"
     },
     {
+      "filename" : "40x40px-1.png",
       "idiom" : "ipad",
       "scale" : "2x",
       "size" : "20x20"
     },
     {
+      "filename" : "29x29px.png",
       "idiom" : "ipad",
       "scale" : "1x",
       "size" : "29x29"
     },
     {
+      "filename" : "58_58px-1.png",
       "idiom" : "ipad",
       "scale" : "2x",
       "size" : "29x29"
     },
     {
+      "filename" : "40x40px-2.png",
       "idiom" : "ipad",
       "scale" : "1x",
       "size" : "40x40"
     },
     {
+      "filename" : "80x80px-1.png",
       "idiom" : "ipad",
       "scale" : "2x",
       "size" : "40x40"
     },
     {
+      "filename" : "76x76px.png",
       "idiom" : "ipad",
       "scale" : "1x",
       "size" : "76x76"
     },
     {
+      "filename" : "152x152px.png",
       "idiom" : "ipad",
       "scale" : "2x",
       "size" : "76x76"
     },
     {
+      "filename" : "167x167px.png",
       "idiom" : "ipad",
       "scale" : "2x",
       "size" : "83.5x83.5"
     },
     {
+      "filename" : "1024x1024px.png",
       "idiom" : "ios-marketing",
       "scale" : "1x",
       "size" : "1024x1024"

+ 126 - 0
Introduce/Assets.xcassets/LaunchImage.launchimage/Contents.json

@@ -0,0 +1,126 @@
+{
+  "images" : [
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-9.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "12.0",
+      "orientation" : "portrait",
+      "scale" : "3x",
+      "subtype" : "2688h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS2-5.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "12.0",
+      "orientation" : "landscape",
+      "scale" : "3x",
+      "subtype" : "2688h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-5.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "12.0",
+      "orientation" : "portrait",
+      "scale" : "2x",
+      "subtype" : "1792h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS2-2.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "12.0",
+      "orientation" : "landscape",
+      "scale" : "2x",
+      "subtype" : "1792h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-8.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "11.0",
+      "orientation" : "portrait",
+      "scale" : "3x",
+      "subtype" : "2436h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS2-3.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "11.0",
+      "orientation" : "landscape",
+      "scale" : "3x",
+      "subtype" : "2436h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-7.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "3x",
+      "subtype" : "736h"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "minimum-system-version" : "8.0",
+      "orientation" : "landscape",
+      "scale" : "3x",
+      "subtype" : "736h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-4.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "2x",
+      "subtype" : "667h"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-1.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "7.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-3.png",
+      "idiom" : "iphone",
+      "minimum-system-version" : "7.0",
+      "orientation" : "portrait",
+      "scale" : "2x",
+      "subtype" : "retina4"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "orientation" : "portrait",
+      "scale" : "1x"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-2.png",
+      "idiom" : "iphone",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "filename" : "iOS-6.png",
+      "idiom" : "iphone",
+      "orientation" : "portrait",
+      "scale" : "2x",
+      "subtype" : "retina4"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-1.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-2.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-3.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-4.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-5.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-6.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-7.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-8.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS-9.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-2.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-3.png


二进制
Introduce/Assets.xcassets/LaunchImage.launchimage/iOS2-5.png


+ 0 - 12
Introduce/Info.plist

@@ -6,18 +6,6 @@
 	<array>
 		<string>_adhp._tcp</string>
 	</array>
-	<key>NSCameraUsageDescription</key>
-	<string>请点击"允许"以允许访问,以便于反馈,上传头像等功能图片上传</string>
-	<key>NSMicrophoneUsageDescription</key>
-	<string>请点击"允许"以允许访问,以便于使用视频制作功能</string>
-	<key>NSPhotoLibraryAddUsageDescription</key>
-	<string>请点击"允许"以允许访问,以便于图片保存</string>
-	<key>NSPhotoLibraryUsageDescription</key>
-	<string>请点击"允许"以允许访问,以便于反馈,上传头像等功能图片上传</string>
-	<key>UILaunchStoryboardName</key>
-	<string>LaunchScreen</string>
-	<key>UIMainStoryboardFile</key>
-	<string>Main</string>
 	<key>UIStatusBarStyle</key>
 	<string>UIStatusBarStyleLightContent</string>
 </dict>

+ 62 - 10
Introduce/Record/INVideoExportController.swift

@@ -10,6 +10,7 @@ import BFUIKit
 import Photos
 import BFRecordScreenKit
 import UIKit
+import BFCommonKit
 
 
 class INVideoExportController: BFBaseViewController {
@@ -17,6 +18,11 @@ class INVideoExportController: BFBaseViewController {
     var videoAsset : AVURLAsset?
     var avplayerTimeObserver: NSKeyValueObservation?
     let backV = UIView()
+    var hasSaveAll = false
+    var hasSaveOnly = false
+    var saveAllUlr = URL(fileURLWithPath: "aaa")
+    var saveOnlyUlr = URL(fileURLWithPath: "aaa")
+    
     // 播放进度
     lazy var progreddL : UILabel = {
         let l = UILabel(frame: CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: cScreenWidth, height: 14))
@@ -69,7 +75,7 @@ class INVideoExportController: BFBaseViewController {
         exportBtn.setImage(UIImage(named: "export_btn"), for: .normal)
         exportBtn.backgroundColor = ThemeStyleColor
         exportBtn.addCorner(roundingCorners: .allCorners, corner: 8)
-        exportBtn.addTarget(self, action: #selector(exportNow), for: .touchUpInside)
+        exportBtn.addTarget(self, action: #selector(saveNow), for: .touchUpInside)
         return exportBtn
     }()
     
@@ -128,6 +134,16 @@ class INVideoExportController: BFBaseViewController {
                     let item = AVPlayerItem(url: fileUrl)
                     sself.avplayer.replaceCurrentItem(with: item)
                     sself.avplayer.play()
+                    
+                    if sself.saveAllBtn.isSelected {
+                        sself.saveAllUlr = fileUrl
+                        sself.hasSaveAll = true
+                    }
+                    
+                    if sself.saveOnlyBtn.isSelected {
+                        sself.saveOnlyUlr = fileUrl
+                        sself.hasSaveOnly = true
+                    }
                 }
             }
         }
@@ -162,9 +178,11 @@ class INVideoExportController: BFBaseViewController {
         
         addSubviews()
         
-        export.prepareData()
 //        export.startExprot()
 
+        DispatchQueue.main.asyncAfter(deadline: .now()+0.2) {[weak self] in
+            self?.exportNow()
+        }
     }
     
     func addSubviews(){
@@ -190,7 +208,7 @@ class INVideoExportController: BFBaseViewController {
         }
         
         progressView.snp.makeConstraints { make in
-            make.center.height.equalToSuperview()
+            make.left.top.height.equalToSuperview()
             make.width.equalTo(0)
         }
         
@@ -244,12 +262,31 @@ class INVideoExportController: BFBaseViewController {
     
     //MARK: - 按钮事件
     
-    @objc func exportNow(){
-        bottomView.isHidden = true
-        progressView.isHidden = false
-        progressL.isHidden = false
-        progreddL.isHidden = true
-        export.startExprot(synthesisAll:saveAllBtn.isSelected)
+     func exportNow(){
+         if bottomView.isHidden {
+             cShowHUB(superView: nil, msg: "正在合成中。。。")
+             return
+         }
+         bottomView.isHidden = true
+         progressView.isHidden = false
+         progressL.isHidden = false
+         progreddL.isHidden = true
+         export.startExprot(synthesisAll:saveAllBtn.isSelected)
+         
+    }
+    
+    @objc func saveNow(){
+        if let url = (avplayer.currentItem?.asset as? AVURLAsset)?.url{
+            PHPhotoLibrary.shared().performChanges {
+                PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: url)
+            } completionHandler: { isFinished, _ in
+                if isFinished {
+                    DispatchQueue.main.async {
+                        cShowHUB(superView: nil, msg: "保存成功")
+                    }
+                }
+            }
+        }
     }
     
     @objc func saveAllAction(btn:UIButton){
@@ -258,7 +295,14 @@ class INVideoExportController: BFBaseViewController {
         }
         btn.isSelected = true
         saveOnlyBtn.isSelected = false
-        
+        avplayer.pause()
+        if !hasSaveAll{
+            exportNow()
+        }else{
+            let item = AVPlayerItem(url: saveAllUlr)
+            avplayer.replaceCurrentItem(with: item)
+            avplayer.play()
+        }
     }
     
     @objc func saveOnlyAction(btn:UIButton){
@@ -267,6 +311,14 @@ class INVideoExportController: BFBaseViewController {
         }
         btn.isSelected = true
         saveAllBtn.isSelected = false
+        avplayer.pause()
+        if !hasSaveOnly {
+            exportNow()
+        }else{
+            let item = AVPlayerItem(url: saveOnlyUlr)
+            avplayer.replaceCurrentItem(with: item)
+            avplayer.play()
+        }
     }
     
     @objc func play(){