launchCameraAsync
already lets you open the native camera with both
photo and video capture available (
mediaTypes: ["images", "videos"]
on iOS correctly surfaces the OS camera's own built-in photo/video
toggle). What's missing: there's no way to control which mode that
combined camera opens into — it always opens in the OS default (photo),
even when the app already knows the user's intent (e.g. two separate
"take a photo" / "take a video" buttons that both open the same
combined camera for its native toggle).
iOS's
UIImagePickerController
already exposes exactly this via a
public property,
cameraCaptureMode: .photo | .video
— `expo-image-
picker
just doesn't read/set it from
ImagePickerOptions` anywhere
yet.
Proposed API
:
`ImagePickerOptions.cameraCaptureMode?: 'photo' |
'video'
, applied when
mediaTypes
includes both
images` and
videos
. iOS-only — Android's
launchCameraAsync
maps a single media
type to a single intent action (
ACTION_IMAGE_CAPTURE
/
ACTION_VIDEO_CAPTURE
), there's no combined-camera intent in AOSP to
apply this to.
Happy to put together the PR (types + Swift + tests + docs) — opened
a GitHub issue first per the contributing guide, but the repo's own
template says feature requests get closed there and redirected here,
so following that.
(Original GitHub issue, auto-closed per repo policy: