react-native-compressor
react-native-compressor copied to clipboard
`getVideoMetaData` doesn't take into account video rotation
Current behavior
On Android, getVideoMetaData does not take into account video orientation. A portrait video has the same width and height as a landscape one.
Expected behavior
Width and height should be reversed for portrait images vs landscape ones.
Platform
- [X] Android
- [ ] iOS
React Native Version
0.76.6
React Native Compressor Version
1.10.3
Reproducible Steps And Demo
Looking at the code here https://github.com/numandev1/react-native-compressor/blob/0e316b359ab8a398cc6d84d1fb743752298c37d8/android/src/main/java/com/reactnativecompressor/Video/VideoMain.kt#L59-L86
It seems that use of METADATA_KEY_VIDEO_ROTATION in there somewhere is necessary, similar to https://github.com/numandev1/react-native-compressor/blob/0e316b359ab8a398cc6d84d1fb743752298c37d8/android/src/main/java/com/reactnativecompressor/Video/VideoCompressor/compressor/Compressor.kt#L107-L117