VideoPicker or ImagePicker[type=video]
complete
Alex Russell
After the great work bringing video recording into the Camera component, it would appear that the only thing left to complete the "visual media" suite would be to allow a user to select videos from their phone's storage. This should work just like the current Expo ImagePicker but filter to only video files (and/or both, maybe).
Unfortunately I don't know about Android, but on iOS the RN ImagePicker (https://facebook.github.io/react-native/docs/imagepickerios.html) allows a developer to specify the type of media (images and/or videos), whereas the Expo ImagePicker has it hardcoded to images only (https://github.com/expo/expo/blob/master/ios/Exponent/Versioned/Modules/Api/EXImagePicker.m#L98).
Using the native iOS ImagePicker in RN would be fine in Expo but the FileSystem API doesn't support the URIs returned from it (they are not inside the documents or the cache directory for the app, plus Expo has extra validation on paths to namespace the Expo app too), so we can't access the files without ejecting and getting some native FS access. While an update to the FileSystem API would help (as per @Brent Vatne's suggestion to me in the Camera component request), I really feel that because we have ImagePicker in Expo, the video picker should also be part of Expo, including the magic Expo does to make these files natively accessible in the cache directory after they are selected (https://github.com/expo/expo/blob/master/ios/Exponent/Versioned/Modules/Api/EXImagePicker.m#L138).
Alex Russell
Haha you kept that one quiet! 🎉
Brent Vatne
coming in sdk23
Abhishek Raj
Brent Vatne: Can we have an option for mediaTypes in launchCameraAsync function too? It is needed because some android devices does not get the correct orientation of the video from the Camera component(Samsung Galaxy Devices). If we can use the native camera module to record a video it would automatically be in correct orientation whatsoever.
Brent Vatne
Abhishek Raj: can you post a bug report with more information, including how to reproduce this? https://github.com/expo/expo/issues
Abhishek Raj
Brent Vatne: https://github.com/expo/expo/issues/1344
I tried this on Samsung devices but the orientation isn't correct for videos. That is why ImagePicker.launchCameraAsync() can be called to get/record the videos from native camera app on the device. This used to work on sdk23 when ImagePicker always used to get videos as well as images.
m
msm
Abhishek Raj: i am not able to record videos by using image picker
Brent Vatne
complete