Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 8.1.0
-
Component/s: iOS
-
Labels:
-
Story Points:5
-
Sprint:2019 Sprint 10
Description
Summary:
When selecting a video from the gallery, iOS will transcode/convert the selected video by default and return the newly formatted video instead. This can cause a very long delay if the video is large.
Solution:
Add an iOS-only "allowTranscoding" option for our Ti.Media.openPhotoGallery() method, when set false, will return the selected video as-is without transcoding it. This will solve the long delay issue.
Ti.Media.openPhotoGallery({
|
allowTranscoding: false, |
mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
|
success: function(e) { |
// Got it. |
},
|
});
|
Note:
There is no equivalent to this on Android, which always returns a reference to the video as-is. So, this is an iOS only feature.
Native Implementation Details:
Add this code at line 1746. I can provide a PR
if ([TiUtils isIOS11OrGreater]) { |
BOOL disableVideoCompression = [TiUtils boolValue:@"disableVideoCompression" properties:args def:NO]; |
if (disableVideoCompression) { |
picker.videoExportPreset = AVAssetExportPresetPassthrough;
|
}
|
}
|
[self displayModalPicker:picker settings:args];
|