Commit eac22a84b038fb76b8cc6b3f843f6b3460e36c3c
1 parent
e11be61f
提交0.1.20_更改进度返回错误
Showing
2 changed files
with
3 additions
and
4 deletions
CNLiveUploadManager.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveUploadManager' | 10 | s.name = 'CNLiveUploadManager' |
| 11 | - s.version = '0.1.19' | 11 | + s.version = '0.1.20' |
| 12 | s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取' | 12 | s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveUploadManager/Classes/CNLiveUploadManager.m
| @@ -1415,9 +1415,7 @@ static CNLiveUploadManager *_uploadManager; | @@ -1415,9 +1415,7 @@ static CNLiveUploadManager *_uploadManager; | ||
| 1415 | options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic; | 1415 | options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic; |
| 1416 | options.networkAccessAllowed = YES; | 1416 | options.networkAccessAllowed = YES; |
| 1417 | options.progressHandler = ^(double progress, NSError * _Nullable error, BOOL * _Nonnull stop, NSDictionary * _Nullable info) { | 1417 | options.progressHandler = ^(double progress, NSError * _Nullable error, BOOL * _Nonnull stop, NSDictionary * _Nullable info) { |
| 1418 | - NSLog(@"输出进度 = %f",progress); | ||
| 1419 | - NSLog(@"transCoding progress: %f", progress); | ||
| 1420 | - !progressCount ? : progressCount(progress); | 1418 | + |
| 1421 | 1419 | ||
| 1422 | }; | 1420 | }; |
| 1423 | __weak typeof(self) weakSelf = self; | 1421 | __weak typeof(self) weakSelf = self; |
| @@ -1435,6 +1433,7 @@ static CNLiveUploadManager *_uploadManager; | @@ -1435,6 +1433,7 @@ static CNLiveUploadManager *_uploadManager; | ||
| 1435 | [strongSelf startExportVideoWithVideoAsset:videoAsset presetName:AVAssetExportPresetMediumQuality outputPath:outputPath success:^(NSString *outputPath) { | 1433 | [strongSelf startExportVideoWithVideoAsset:videoAsset presetName:AVAssetExportPresetMediumQuality outputPath:outputPath success:^(NSString *outputPath) { |
| 1436 | /// 不限制大小 | 1434 | /// 不限制大小 |
| 1437 | NSURL *url = [NSURL URLWithString:outputPath]; | 1435 | NSURL *url = [NSURL URLWithString:outputPath]; |
| 1436 | + !progressCount ? : progressCount(1.0); | ||
| 1438 | !success ? : success(url); | 1437 | !success ? : success(url); |
| 1439 | 1438 | ||
| 1440 | } failure:^(NSString *errorMessage, NSError *error) { | 1439 | } failure:^(NSString *errorMessage, NSError *error) { |