New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for LiDAR, TrueDepth, External (USB) and Continuity Camera Devices (iOS 17) #1824
Conversation
… Camera Devices (iOS 17)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uses the new iOS 17 API where the user can prefer a default device, otherwise fall back to the first device of the available ones
Hello @mrousavy, I just tried on an iPad with this update and it works! (I casted a HDMI from my computer with a video capture card) if #available(iOS 17, *) {
deviceTypes.append(.external)
} |
@tiste wow this is amazing!!! can you do a demo of the Bunny Video being streamed to your iPad? I would love to post this on Twitter 😅 |
Here it is! RPReplay_Final1695807197.MP4 |
Just run into issue on eas build with:
Think it's due to iPhoneOS16.4, but don't really know how to change it. |
Yea, I think EAS doesn't have Xcode 15 yet. That part requires Xcode 15 |
What
This PR consists of 3 changes:
CameraDevice.devices
toCameraDevice.physicalDevices
This is based on feat: New JS API for
useCameraDevice
anduseCameraFormat
#1784 which adds a new Camera Devices API that allows us to listen for Camera Device changes (USB camera plugged in/out)EDIT: Actually external and continuity camera devices were supported before (after the change in feat: New JS API for
useCameraDevice
anduseCameraFormat
#1784), they were just reported as wide-angle cameras. I think I'm gonna leave it at that for now, no need to change that.userPreferredCameraDevice
, which is a device the user prefers to use across apps (iOS 17). If not set, use the first available Camera Device (usually id 0)Blockers
Currently, a device looks like this:
But the external and continuity cameras don't have the device types. They don't tell me whether they're wide-angle or ultra-wide etc., they just say they're external. Therefore I either need to add a
unknown
orexternal
type to the devices, which is kinda lame as the lens information should be known (through FOV/focal length). Only the position should beexternal
in that case.I'll need to investigate this, but unfortunately I don't have a device to test this on. Someone wanna borrow me an iPad?
Changes
Tested on
Related issues