···11+diff --git a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/MediaHandler.kt b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/MediaHandler.kt
22+index c863fb8..cde8859 100644
33+--- a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/MediaHandler.kt
44++++ b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/MediaHandler.kt
55+@@ -101,16 +101,30 @@ internal class MediaHandler(
66+ val fileData = getAdditionalFileData(sourceUri)
77+ val mimeType = getType(context.contentResolver, sourceUri)
88+99++ // Extract basic metadata
1010++ var width = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)
1111++ var height = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)
1212++ val rotation = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION)
1313++
1414++ // Android returns the encoded width/height which do not take the display rotation into
1515++ // account. For videos recorded in portrait mode the encoded dimensions are often landscape
1616++ // (e.g. 1920x1080) paired with a 90°/270° rotation flag. iOS adjusts these values before
1717++ // reporting them, so to keep the behaviour consistent across platforms we swap the width
1818++ // and height when the rotation indicates the video should be displayed in portrait.
1919++ if (rotation % 180 != 0) {
2020++ width = height.also { height = width }
2121++ }
2222++
2323+ return ImagePickerAsset(
2424+ type = MediaType.VIDEO,
2525+ uri = outputUri.toString(),
2626+- width = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH),
2727+- height = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT),
2828++ width = width,
2929++ height = height,
3030+ fileName = fileData?.fileName,
3131+ fileSize = fileData?.fileSize,
3232+ mimeType = mimeType,
3333+ duration = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_DURATION),
3434+- rotation = metadataRetriever.extractInt(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION),
3535++ rotation = rotation,
3636+ assetId = sourceUri.getMediaStoreAssetId()
3737+ )
3838+ } catch (cause: FailedToExtractVideoMetadataException) {
+5
patches/expo-image-picker+16.1.4.patch.md
···11+# Expo Image Picker patch
22+33+Cherry-picked https://github.com/expo/expo/pull/37849
44+55+Remove when we update to a version that includes this commit.