question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

launchImageLibraryAsync returns portrait video on iOS and Android with switched dimensions

See original GitHub issue

Steps to reproduce:

  1. Run ImagePicker.launchImageLibraryAsync with mediaTypes = ImagePicker.MediaTypeOptions.All
  2. Select a portrait-oriented video (like for an instagram story) on the phone.
  3. Notice that the width and height need to be flipped but there is no way to know that. The height should be the larger value (since it is a portrait video).

Managed SDK 39.0

Only hacky workaround for now that I see is:

const asset = await MediaLibrary.createAssetAsync(uri);
        console.log(await MediaLibrary.getAssetInfoAsync(asset))
 await MediaLibrary.deleteAssetsAsync([asset]);

which I have verified does return the width and height correctly. Unfortunately if you do await MediaLibrary.deleteAssetsAsync([asset]); on iOS it will prompt the user if they want to delete this duplicate. The user does not know it is a duplicate so I will have to leave the extra duplicate on their system… . 🙉

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cruzachcommented, Feb 8, 2021

hey @Aryk! I don’t have much to add here- we try to cover as many issues as quickly & efficiently as we can. Investigating and fixing bugs like this takes some time, as I’m sure you know.

One way to help would be to identify the root cause of the issue, that way whoever makes the fix (whether it be an internal or external contributor) knows exactly where to begin

1reaction
AdamJNavarrocommented, Nov 5, 2020

That’s correct. For Managed projects, fixes of this nature will be rolled out is with SDK releases. (Unless the bug is a major and widespread issue that calls for a minor/patch release like we saw with SDK39).

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImagePicker - Expo Documentation
expo-image-picker provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera....
Read more >
react-native-image-picker vs expo ImagePicker - Stack Overflow
I'm using RN v0.60.4 with react-native-image-picker v1.0.1. Works fine on android emulator and ios simulator. It very well could be an issue ...
Read more >
CHANGELOG.md · 熊刚/Expo - Gitee.com
(#6311 by @kyletsang); Added a videoExportPreset field to ImagePickerOptions , which sets dimensions and compression algorithm for exported video on iOS.
Read more >
@expo/config-plugins | Yarn - Package Manager
(#9618 by @IjzerenHein); Fix orientation being returned incorrectly for videos in portrait mode in onReadyForDisplay on iOS. (#10449 by @lachenmayer) ...
Read more >
CS50's Mobile App Development with React Native 2018
CS50 Video Player ... motion that has been exposed in iOS APIs · 0:47:30and also in Android APIs. ... 1:32:22But then when it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found