-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-26599 Optionally disable video compression when importing video #10492
Changes from all commits
8608767
a7ff877
f7cc5d0
0ffa31e
bcafe0b
f092b34
51feed3
8e1d77d
1cbcf24
7d9d530
a26ac70
98eb3c8
51b8157
0f4360f
e815543
3bb2fcd
00f1107
e183344
97e657a
1551e11
97e365e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1713,6 +1713,12 @@ - (void)showPicker:(NSDictionary *)args isCamera:(BOOL)isCamera | |
[self displayCamera:picker]; | ||
} | ||
} else { | ||
if ([TiUtils isIOSVersionOrGreater:@"11.0"]) { | ||
BOOL allowTranscoding = [TiUtils boolValue:@"allowTranscoding" properties:args def:YES]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't it better if we expose it as a string/constant property and expose other constants as well which is available ? e.g Constants - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is indeed. I've made a quick and dirty solution based on my use case, but I think it's better to provide full control. It's up to you guys, if you want that and the choice using strings or exporting the enum constants There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those other constants tell iOS what to transcode the video formats to. (1) Keep the "allowTranscoding" property and add a "transcodeFormat" type later which tells the system which format to transcode to if "allowTranscoding" is (2) Get rid of the "allowTranscoding" property and provide a "transcodeFormat" type instead which when set I think the only things that worries me here is that format types available will vary between iOS versions... or perhaps worse, by device? Hypothetically, if we were to support this on any other platform (Android and Windows), then you would need to query the system for what formats are available. You can't hard-code it to a format and expect it to magically work. For example, Android device manufacturers may not support some of Google's documented formats in order to lower the cost of the device since there is licensing/royalties involved (I've seen this with low-cost tablets in the past). And Windows N-edition and K-edition don't include any licensed formats by default. Because of the above, I prefer to keep it simple for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with solution 1. Let's have it simple for now as it is. We can add "transcodeFormat" later.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
if (!allowTranscoding) { | ||
picker.videoExportPreset = AVAssetExportPresetPassthrough; | ||
} | ||
} | ||
[self displayModalPicker:picker settings:args]; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add minimum iOS version in document as well. Because this property is only available in iOS 11.0+.
e.g.
osver: {ios: {min: "11.0"}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do