feat(video): support cameraFacing on VideoSourceInput#11
Merged
msilivonik-sc merged 3 commits intoJun 30, 2026
Conversation
Add optional `cameraFacing` ("user" | "environment") to VideoSourceInput,
passed to `createVideoSource` as `cameraType`. The camera type propagates to
the lens (DeviceCamera front/back-facing) and engine tracking, so back-facing
/ world video sources can be flagged correctly. Defaults to "user" (front).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
msilivonik-sc
left a comment
Collaborator
There was a problem hiding this comment.
Left few comments. Thanks for the contributions!
- VideoSourceInput gains optional fpsLimit, passed to createVideoSource. - Pass options object directly (createVideoSource defaults undefined fields). - Reword cameraFacing doc per review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Thanks! Addressed in 4f00086:
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds optional
cameraFacing("user" | "environment") toVideoSourceInput, passed tocreateVideoSourceascameraType.Why
cameraTypepropagates beyond the web media plumbing into the lens runtime: it setscameraInfo.type(front/back), which lens scripts read (DeviceCamerafront-facing) and engine subsystems branch on (gyroscope inversion, world-render provider, depth). Camera sources can already set facing viaoptions.cameraFacing; video sources had no way to, so back-facing / world video sources (e.g. recorded world-tracking clips) were always treated as front-facing.Changes
types.ts— addVideoSourceInput.cameraFacing?: CameraFacing(documented).internal/sourceUtils.ts— forward it tocreateVideoSourceascameraType; combines withtrackingData.internal/sourceUtils.test.ts— tests for cameraFacing pass-through and combined with tracking data.Defaults to
"user"(front) — no behavior change when unset.Test
npm test(26 passing, incl. 2 new),npm run build,npm run typecheck, Prettier — all clean.🤖 Generated with Claude Code