Hey everyone! Elliot here- mucking about with gett...
# sdk-rust
a
Hey everyone! Elliot here- mucking about with getting webRTC running on visionOS. Looks like its pretty close to the same config as iOS. Anyone else looking into this? Looks like there's been a couple commits to the libwebrtc repo to that effect.
m
Hey @astonishing-fireman-34897, yep, we’re working on it!
a
Thanks for the reply @magnificent-art-43333 - excited to hear there's motion on it. Do y'all have a road map on that effort? even something rough would be a great help- it'd be fantastic to have an official release target instead of just the hack i'm throwing together
m
we have an internal version that’s working (with at least our LiveKit Meet sample) for VisionOS 1.X, and we’re now doing the work to integrate it into our build toolchain and etc. It’s being actively worked on right now, and while I don’t have a specific date to share, maybe if you ping back in a couple weeks on this thread I can share an update 🙂
a
🙌 fantastic! thanks for the update!
b
That’s great news @magnificent-art-43333! Elliot & I are teammates, wanted to add some more color: We’re building a visionOS (and Meta Quest) app using Unity. We’ve almost got LiveKit working on our visionOS app and while figuring out the last pieces saw @freezing-lifeguard-43174’s commits on the webrtc repo and Livekit client-sdk-unity repo. We’d love to join forces instead of duplicating effort. This is a new in-development project for us so we’re not expecting production readiness. We’d love to help contribute code and test. Please let us know if there’s any way we can be helpful!
f
Hey, yes, we are trying to make it work correctly in swift SDK first, as for unity, we need to make it compile the corresponding FFI static library of visionOS in rust-sdk CI, and then add visionOS support from unity sdk. If you have any ideas, I’d love to talk
a
Hey @freezing-lifeguard-43174! Glad to hear there's a clear road forward. We've taken a few steps already, but would love to check our thinking. We've essentially hijacked the iOS livekit implementation, using it as a starting point for the new target. Our process up until now has been : 1. Create a patch for the libwebrtc source code that configures it for visionOS. This involved adding a new static flag (
xros
) and compiler directive (
WEBRTC_XROS
) that get set if the release is targeting iOS. This flag is then used to conditionally exclude code and libraries that aren't necessary/supported on visionOS. 2. Create a patch to the libwebrtc build process that sets the new flag properly and indicates where to pull the XROS sdk from. 3. Apply these patches as part of the build process found in
build_ios.sh
4. Build LiveKit against the new custom libwebrtc version produced by running
./build_iso.sh
in release mode. 5. Package/use the resulting archive in unity
we're running into a couple issues: 1. Between steps 4 and 5, we're seeing linking errors that are preventing LiveKit from completing it's build process. It seems it can't find files like
task_queue.h
2.
GLKit
doesn't exist on visionOS, but is referenced in the iOS implementation of libwebrtc (not sure what our move is going to be here)
f
Metal and OpenGL are not supported by VisionOS, so we exclude them in
<http://BUILD.gn|BUILD.gn>
. In Swift SDK, we may render SampleBuffer directly, and in Unity, we only need to convert VideoFrame to RGB. Issues 1 you described do not appear in the branch we maintain (based on m125_release), and we can successfully compile
WebRTC.framework
for
xrdevice
and
xrsimulator
Refer to the following script
framework_build_for_xr.sh debug | release
👀 1
a
oh this is fantastic! thanks so much! i will take a look soon
Issues 1 you described do not appear in the branch we maintain (based on m125_release)
is this
origin/feature/support-for-vision-pro
?
f
a
hey team, been testing out all the branches / prs to support visionOS - been trying to use the camera on the visionOS with the persona - made some changes myself to the
client-sdk-swift
and the farthest I got was to get the persona camera device via
AVCaptureDevice.systemPreferredCamera
since
DiscoverySession
is not supported - i know its a work in progress but if I can get some guidance it would be very appreciated