-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[ios][image-picker] Add preferredAssetRepresentationMode to image picker #22456
Conversation
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.
Looking good 🏅
Thanks for your contribution.
Please, apply my suggestions.
@@ -142,6 +142,7 @@ public class ImagePickerModule: Module, OnMediaPickingResultHandler { | |||
// selection limit = 1 --> single selection, reflects the old picker behavior | |||
configuration.selectionLimit = options.allowsMultipleSelection ? options.selectionLimit : SINGLE_SELECTION | |||
configuration.filter = options.mediaTypes.toPickerFilter() | |||
configuration.preferredAssetRepresentationMode = options.preferredAssetRepresentationMode.toAssetRepresentationMode() |
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.
configuration.preferredAssetRepresentationMode = options.preferredAssetRepresentationMode.toAssetRepresentationMode() | |
if #available(iOS 14, *) { | |
configuration.preferredAssetRepresentationMode = options.preferredAssetRepresentationMode.toAssetRepresentationMode() | |
} |
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.
@lukmccall Thank you, I've added it!
# Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> In my previous PR #22456, I added the changelog entry under the wrong version, it should be under `Unpublished` instead of `14.2.0`, my bad. # How <!-- How did you build this feature or fix this bug and why? --> - Move the entry to `Unpublished` # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
Why
preferredAssetRepresentationMode
gives us the option to skip transcodingHow
ImagePickerOptions
Test Plan
bare-expo
app on iOSexpo-image-picker
and launched the photo library picker with all the options.hevc
video withautomatic
andcurrent
,current
is much fasterChecklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).