feat(realtime): add resolution option#140
Merged
Merged
Conversation
resolution option to select 720p or 1080p outputresolution option
commit: |
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.
Summary
Lets users of realtime models opt into 1080p output via a new
resolutionoption onrealtime.connect. Defaults to720p(no behavior change for existing callers).Usage
Test plan
pnpm typecheckpnpm test(4 new unit tests covering URL construction + Zod validation)pnpm format:checklucy-2.1+resolution: "1080p"delivers a 1884×1080 remote trackNote
Low Risk
Low risk: adds an optional, Zod-validated
resolutionparameter that only affects realtime WebRTC URL query construction, with coverage to prevent invalid values.Overview
Adds a new optional
resolutionsetting torealtime.connect(validated as"720p"or"1080p") and forwards it to the realtime WebRTC endpoint via aresolution=query parameter when provided.Updates the SDK README with usage examples and adds unit tests verifying URL construction (param omitted vs appended) and input validation for invalid resolutions.
Reviewed by Cursor Bugbot for commit 56c8621. Bugbot is set up for automated code reviews on this repo. Configure here.