Skip to content

feat(realtime): add resolution option#140

Merged
AdirAmsalem merged 1 commit into
mainfrom
realtime-output-resolution
May 18, 2026
Merged

feat(realtime): add resolution option#140
AdirAmsalem merged 1 commit into
mainfrom
realtime-output-resolution

Conversation

@AdirAmsalem
Copy link
Copy Markdown
Contributor

@AdirAmsalem AdirAmsalem commented May 18, 2026

Summary

Lets users of realtime models opt into 1080p output via a new resolution option on realtime.connect. Defaults to 720p (no behavior change for existing callers).

Usage

const realtimeClient = await client.realtime.connect(stream, {
  model: models.realtime("lucy-2.1"),
  resolution: "1080p", // default: "720p"
  onRemoteStream,
});

Test plan

  • pnpm typecheck
  • pnpm test (4 new unit tests covering URL construction + Zod validation)
  • pnpm format:check
  • Manual smoke against staging: verify lucy-2.1 + resolution: "1080p" delivers a 1884×1080 remote track

Note

Low Risk
Low risk: adds an optional, Zod-validated resolution parameter that only affects realtime WebRTC URL query construction, with coverage to prevent invalid values.

Overview
Adds a new optional resolution setting to realtime.connect (validated as "720p" or "1080p") and forwards it to the realtime WebRTC endpoint via a resolution= 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.

@AdirAmsalem AdirAmsalem changed the title feat(realtime): add resolution option to select 720p or 1080p output feat(realtime): add resolution option May 18, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 18, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@decartai/sdk@140

commit: 56c8621

@AdirAmsalem AdirAmsalem merged commit 9d4e993 into main May 18, 2026
5 checks passed
@AdirAmsalem AdirAmsalem deleted the realtime-output-resolution branch May 18, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant