react-native-image-picker / react-native-image-picker

:sunrise_over_mountains: A React Native module that allows you to use native UI to select media from the device library or directly from the camera.
MIT License
8.47k stars 2.08k forks source link

[🐛] launchImageLibrary Options do not change the Video size #2125

Open kusche12 opened 1 year ago

kusche12 commented 1 year ago

Description

Uploading very large video files can cause the async launchImageLibrary call to take an extraordinary long time (up to 12min for a 3gb file)

I applied the optional params as an attempt to reduce the size of the video file; however, this did not work. I then started running my own tests using the same 30s video with different options being used, and I noticed that the file size never changed.

How to repeat issue and example

Use the launchImageLibrary function to select a video from your gallery and console log the resulting file size:

const result = await launchImageLibrary(options?);
const { fileSize } = result.assets[0];
console.log(fileSize); // All file sizes are the same

Pasted Graphic 2 FILE SIZE: 57,187,279

Pasted Graphic 3 FILE SIZE: 57,187,279

Pasted Graphic 4 FILE SIZE: 57,187,279

Additional Information

nguyenductoan1995 commented 1 year ago

same issue i can't limit duration of video