mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-06-16 11:59:29 +08:00
fix(storage): fix video asset resources on iOS13 (#2750)
* 🐛 Fix video asset resource on iOS13 * Update packages/storage/ios/RNFBStorage/RNFBStorageCommon.m Co-Authored-By: Mike Diarmid <mike.diarmid@gmail.com> * Update packages/storage/ios/RNFBStorage/RNFBStorageCommon.m Co-Authored-By: Mike Diarmid <mike.diarmid@gmail.com>
This commit is contained in:
committed by
Mike Diarmid
parent
9dd3fa68c3
commit
fded28621f
@@ -182,9 +182,17 @@
|
||||
|
||||
NSArray<PHAssetResource *> *resources = [PHAssetResource assetResourcesForAsset:asset];
|
||||
for (PHAssetResource *resource in resources) {
|
||||
exportSession.outputFileType = resource.uniformTypeIdentifier;
|
||||
if (exportSession.outputFileType != nil)
|
||||
break;
|
||||
if (resources.count > 1) {
|
||||
if (resource.type != PHAssetResourceTypeVideo) {
|
||||
continue;
|
||||
} else {
|
||||
exportSession.outputFileType = resource.uniformTypeIdentifier;
|
||||
}
|
||||
} else {
|
||||
exportSession.outputFileType = resource.uniformTypeIdentifier;
|
||||
}
|
||||
|
||||
if (exportSession.outputFileType != nil) break;
|
||||
}
|
||||
|
||||
[exportSession exportAsynchronouslyWithCompletionHandler:^{
|
||||
|
||||
Reference in New Issue
Block a user