Commit 15075383 authored by yuzheng's avatar yuzheng

强壮导出视频的方法,在沙盒保存路径中加入视频名字;发布3.1.0版本

parent 6aad5c9c
...@@ -133,7 +133,7 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能 ...@@ -133,7 +133,7 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能
## 六. Release Notes 最近更新 ## 六. Release Notes 最近更新
3.0.9 适配阿拉伯等语言下从右往左布局的特性 3.1.0 适配阿拉伯等语言下从右往左布局的特性
3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案 3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案
**3.0.7 适配iPhoneXR、XS、XS Max,建议大家尽快更新** **3.0.7 适配iPhoneXR、XS、XS Max,建议大家尽快更新**
3.0.6 优化保存照片、视频的方法 3.0.6 优化保存照片、视频的方法
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "TZImagePickerController" s.name = "TZImagePickerController"
s.version = "3.0.9" s.version = "3.1.0"
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 = "8.0" s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.0.9" } s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.1.0" }
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>3.0.9</string> <string>3.1.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -572,10 +572,12 @@ static dispatch_once_t onceToken; ...@@ -572,10 +572,12 @@ static dispatch_once_t onceToken;
// You can compress the resolution to lower. Or you can support more higher resolution. // You can compress the resolution to lower. Or you can support more higher resolution.
if ([presets containsObject:presetName]) { if ([presets containsObject:presetName]) {
AVAssetExportSession *session = [[AVAssetExportSession alloc] initWithAsset:videoAsset presetName:presetName]; AVAssetExportSession *session = [[AVAssetExportSession alloc] initWithAsset:videoAsset presetName:presetName];
NSDateFormatter *formater = [[NSDateFormatter alloc] init]; NSDateFormatter *formater = [[NSDateFormatter alloc] init];
[formater setDateFormat:@"yyyy-MM-dd-HH:mm:ss-SSS"]; [formater setDateFormat:@"yyyy-MM-dd-HH:mm:ss-SSS"];
NSString *outputPath = [NSHomeDirectory() stringByAppendingFormat:@"/tmp/output-%@.mp4", [formater stringFromDate:[NSDate date]]]; NSString *outputPath = [NSHomeDirectory() stringByAppendingFormat:@"/tmp/video-%@.mp4", [formater stringFromDate:[NSDate date]]];
if (videoAsset.URL && videoAsset.URL.lastPathComponent) {
outputPath = [outputPath stringByReplacingOccurrencesOfString:@".mp4" withString:[NSString stringWithFormat:@"-%@", videoAsset.URL.lastPathComponent]];
}
// NSLog(@"video outputPath = %@",outputPath); // NSLog(@"video outputPath = %@",outputPath);
session.outputURL = [NSURL fileURLWithPath:outputPath]; session.outputURL = [NSURL fileURLWithPath:outputPath];
......
...@@ -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 3.0.9 - 2018.10.09 // version 3.1.0 - 2018.11.03
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
/* /*
......
...@@ -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 3.0.9 - 2018.10.09 // version 3.1.0 - 2018.11.03
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
#import "TZImagePickerController.h" #import "TZImagePickerController.h"
...@@ -235,6 +235,7 @@ ...@@ -235,6 +235,7 @@
self = [super initWithRootViewController:previewVc]; self = [super initWithRootViewController:previewVc];
if (self) { if (self) {
self.maxImagesCount = 1; self.maxImagesCount = 1;
self.allowPickingImage = YES;
self.allowCrop = YES; self.allowCrop = YES;
self.selectedAssets = [NSMutableArray arrayWithArray:@[asset]]; self.selectedAssets = [NSMutableArray arrayWithArray:@[asset]];
[self configDefaultSetting]; [self configDefaultSetting];
......
...@@ -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>3.0.9</string> <string>3.1.0</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