Commit c8c2fe3f authored by yuzheng.tz's avatar yuzheng.tz

新增needFixComposition属性,默认为NO,不再主动修正视频转向,防止部分安卓拍的视频导出失败,发布2.2.6版本

parent 8c704067
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
## 重要提示2:issue未说明下面必要情况的不予处理:1、我的demo是否正常? 2、你用的什么版本? 3、你的初始化TZImagePicker的代码 4、你是pod安装还是源码导入的?是否有改动TZImagePicker内部代码? ## 重要提示2:issue未说明下面必要情况的不予处理:1、我的demo是否正常? 2、你用的什么版本? 3、你的初始化TZImagePicker的代码 4、你是pod安装还是源码导入的?是否有改动TZImagePicker内部代码?
## 重要提示3:1.9.0版本后移除了"prefs:root="的调用,这个API已经被列为私有API,请大家尽快升级。目前最新版本2.2.5 ## 重要提示3:1.9.0版本后移除了"prefs:root="的调用,这个API已经被列为私有API,请大家尽快升级。目前最新版本2.2.6
关于升级iOS10和Xcdoe8的提示: 关于升级iOS10和Xcdoe8的提示:
在Xcode8环境下将项目运行在iOS10的设备/模拟器中,访问相册和相机需要额外配置info.plist文件。分别是Privacy - Photo Library Usage Description和Privacy - Camera Usage Description字段,详见Demo中info.plist中的设置。 在Xcode8环境下将项目运行在iOS10的设备/模拟器中,访问相册和相机需要额外配置info.plist文件。分别是Privacy - Photo Library Usage Description和Privacy - Camera Usage Description字段,详见Demo中info.plist中的设置。
...@@ -112,8 +112,15 @@ A:是否有集成WRNavigationBar?如有,参考其readme调一下它的wr_s ...@@ -112,8 +112,15 @@ A:是否有集成WRNavigationBar?如有,参考其readme调一下它的wr_s
**Q:导航栏没了?** **Q:导航栏没了?**
A:是否有集成GKNavigationBarViewController?需要升级到2.0.4及以上版本,详见issue:[https://github.com/QuintGao/GKNavigationBarViewController/issues/7](https://github.com/QuintGao/GKNavigationBarViewController/issues/7) A:是否有集成GKNavigationBarViewController?需要升级到2.0.4及以上版本,详见issue:[https://github.com/QuintGao/GKNavigationBarViewController/issues/7](https://github.com/QuintGao/GKNavigationBarViewController/issues/7)
**Q:有的视频导出失败?**
A:升级到2.2.6及以上版本试试,发现是修正视频转向导致的,2.2.6开始默认不再主动修正。如需打开,可设置needFixComposition为YES,但有几率导致安卓拍的视频导出失败。
**Q:视频导出慢?**
A:视频导出分两步,第一步是通过PHAsset获取AVURLAsset,如是iCloud视频则涉及到网络请求,耗时容易不可控,第二步是通过AVURLAsset把视频保存到沙盒,耗时不算多。但第一步耗时不可控,你可以拷贝我源码出来拿到第一步的进度给用户一个进度提示...
## 六. Release Notes 最近更新 ## 六. Release Notes 最近更新
2.2.6 新增needFixComposition属性,默认为NO,不再主动修正视频转向,防止部分安卓拍的视频导出失败
2.2.5 修复minPhotoWidthSelectable不生效的问题, 使用@available消除警告 2.2.5 修复minPhotoWidthSelectable不生效的问题, 使用@available消除警告
2.1.8 优化gif图播放的体验,加入iCloud同步进度条;新增notScaleImage属性,设置为YES时内部不去缩放图片 2.1.8 优化gif图播放的体验,加入iCloud同步进度条;新增notScaleImage属性,设置为YES时内部不去缩放图片
2.1.6 新增allowCameraLocation属性,默认为YES,置为NO时不会在照相/摄像时定位,修复一个序号紊乱的bug 2.1.6 新增allowCameraLocation属性,默认为YES,置为NO时不会在照相/摄像时定位,修复一个序号紊乱的bug
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "TZImagePickerController" s.name = "TZImagePickerController"
s.version = "2.2.5" s.version = "2.2.6"
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video" s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
s.homepage = "https://github.com/banchichen/TZImagePickerController" s.homepage = "https://github.com/banchichen/TZImagePickerController"
s.license = "MIT" s.license = "MIT"
s.author = { "banchichen" => "tanzhenios@foxmail.com" } s.author = { "banchichen" => "tanzhenios@foxmail.com" }
s.platform = :ios s.platform = :ios
s.ios.deployment_target = "6.0" s.ios.deployment_target = "6.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "2.2.5" } s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "2.2.6" }
s.requires_arc = true s.requires_arc = true
s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}" s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}"
s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}" s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.2.5</string> <string>2.2.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -888,12 +888,14 @@ static dispatch_once_t onceToken; ...@@ -888,12 +888,14 @@ static dispatch_once_t onceToken;
[[NSFileManager defaultManager] createDirectoryAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"] withIntermediateDirectories:YES attributes:nil error:nil]; [[NSFileManager defaultManager] createDirectoryAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"] withIntermediateDirectories:YES attributes:nil error:nil];
} }
AVMutableVideoComposition *videoComposition = [self fixedCompositionWithAsset:videoAsset]; if ([TZImagePickerConfig sharedInstance].needFixComposition) {
if (videoComposition.renderSize.width) { AVMutableVideoComposition *videoComposition = [self fixedCompositionWithAsset:videoAsset];
// 修正视频转向 if (videoComposition.renderSize.width) {
session.videoComposition = videoComposition; // 修正视频转向
session.videoComposition = videoComposition;
}
} }
// Begin to export video to the output path asynchronously. // Begin to export video to the output path asynchronously.
[session exportAsynchronouslyWithCompletionHandler:^(void) { [session exportAsynchronouslyWithCompletionHandler:^(void) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 2.2.5 - 2018.08.10 // version 2.2.6 - 2018.08.21
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
/* /*
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
/// 默认是NO,如果设置为YES,内部不会缩放图片到photoWidth像素宽 /// 默认是NO,如果设置为YES,内部不会缩放图片到photoWidth像素宽
@property (assign, nonatomic) BOOL notScaleImage; @property (assign, nonatomic) BOOL notScaleImage;
/// 默认是NO,如果设置为YES,导出视频时会修正转向(慎重设为YES,可能导致部分安卓下拍的视频导出失败)
@property (assign, nonatomic) BOOL needFixComposition;
/// The photos user have selected /// The photos user have selected
/// 用户选中过的图片数组 /// 用户选中过的图片数组
@property (nonatomic, strong) NSMutableArray *selectedAssets; @property (nonatomic, strong) NSMutableArray *selectedAssets;
...@@ -332,4 +335,5 @@ ...@@ -332,4 +335,5 @@
@property (assign, nonatomic) BOOL showSelectedIndex; @property (assign, nonatomic) BOOL showSelectedIndex;
@property (assign, nonatomic) BOOL showPhotoCannotSelectLayer; @property (assign, nonatomic) BOOL showPhotoCannotSelectLayer;
@property (assign, nonatomic) BOOL notScaleImage; @property (assign, nonatomic) BOOL notScaleImage;
@property (assign, nonatomic) BOOL needFixComposition;
@end @end
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 2.2.5 - 2018.08.10 // version 2.2.6 - 2018.08.21
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
#import "TZImagePickerController.h" #import "TZImagePickerController.h"
...@@ -273,6 +273,7 @@ ...@@ -273,6 +273,7 @@
self.allowPreview = YES; self.allowPreview = YES;
// 2.2.26版本,不主动缩放图片,降低内存占用 // 2.2.26版本,不主动缩放图片,降低内存占用
self.notScaleImage = YES; self.notScaleImage = YES;
self.needFixComposition = NO;
self.statusBarStyle = UIStatusBarStyleLightContent; self.statusBarStyle = UIStatusBarStyleLightContent;
self.cannotSelectLayerColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8]; self.cannotSelectLayerColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];
self.allowCameraLocation = YES; self.allowCameraLocation = YES;
...@@ -361,6 +362,11 @@ ...@@ -361,6 +362,11 @@
[TZImagePickerConfig sharedInstance].notScaleImage = notScaleImage; [TZImagePickerConfig sharedInstance].notScaleImage = notScaleImage;
} }
- (void)setNeedFixComposition:(BOOL)needFixComposition {
_needFixComposition = needFixComposition;
[TZImagePickerConfig sharedInstance].needFixComposition = needFixComposition;
}
- (void)observeAuthrizationStatusChange { - (void)observeAuthrizationStatusChange {
[_timer invalidate]; [_timer invalidate];
_timer = nil; _timer = nil;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.2.5</string> <string>2.2.6</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment