Skip to content

feat: let wrapper SDKs report their own identity in ClientInfo - #2265

Merged
MaxHeimbrock merged 2 commits into
mainfrom
feat/wrapper-sdk-client-info
Nov 16, 2026
Merged

MaxHeimbrock merged 2 commits into
mainfrom
feat/wrapper-sdk-client-info

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Adds an internal setWrapperSdkInfo() so SDKs built on top of livekit-client (e.g. Unity WebGL) report their own SDK and version to the server instead of JS. livekit-client's version moves to ClientInfo.other_sdks.

The v0 sdk query param is now derived from ClientInfo.sdk, keeping the v0 and v1 signal paths consistent.

REACT_NATIVE still works if set through the old path of isReactNative

Usage

Used by livekit/client-sdk-unity-web#84

Checklist

  • This PR only fixes typos or documentation and needs no accepted issue.
  • An AI tool wrote or helped write this change. Tool: Claude

Adds an internal setWrapperSdkInfo() so SDKs built on top of livekit-client
(e.g. Unity WebGL) report their own SDK and version to the server instead of
JS. livekit-client's version moves to ClientInfo.other_sdks.

The v0 `sdk` query param is now derived from ClientInfo.sdk, keeping the v0
and v1 signal paths consistent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9a3f051

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 116.93 KB (+0.04% 🔺)
dist/livekit-client.umd.js 126.43 KB (+0.09% 🔺)
dist/core/core.mjs 79.56 KB (+0.19% 🔺)

The core build strips @internal members, which left the shared export
of setWrapperSdkInfo dangling in dist/core/types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/api/SignalClient.ts
// ClientInfo
params.set('sdk', isReactNative() ? 'reactnative' : 'js');
// the server expects the enum name lowercased without underscores, e.g. 'js', 'reactnative', 'unityweb'
params.set('sdk', ClientInfo_SDK[info.sdk!].toLowerCase().replace(/_/g, ''));

@MaxHeimbrock MaxHeimbrock Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.replace(/_/g, '') removes every underscore, giving unityweb and reactnative

Comment thread src/room/utils.ts
}

export function getClientInfo(capabilities?: ClientInfo_Capability[]): ClientInfo {
let sdk = isReactNative() ? ClientInfo_SDK.REACT_NATIVE : ClientInfo_SDK.JS;

@MaxHeimbrock MaxHeimbrock Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old react native path is still used here, so this does not force an update in the React SDK.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: I think this makes sense, but I do wonder if it would be preferable longer term if react native were to also use setWrapperSdkInfo? Or if there were a way to introduce a isUnityWeb function? I think ideally it would be good if this worked the same across platforms.

Also, I'm guessing this isn't a thing today, but in the future if we needed to gate some functionality to only happen on unity web then a isUnityWeb would be important to have as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as in Slack:

"The current react native way is a bit more hacky in my opinion, so the next step in unifying would be to move react native over to use the function instead of setting the property."

@MaxHeimbrock
MaxHeimbrock marked this pull request as ready for review November 13, 2026 12:58

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/api/SignalClient.ts Resolved

@1egoman 1egoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense, but see my comment for one possible idea to make this more consistent with react native.

@MaxHeimbrock
MaxHeimbrock merged commit 1acd59b into main Nov 16, 2026
7 checks passed
@MaxHeimbrock
MaxHeimbrock deleted the feat/wrapper-sdk-client-info branch November 16, 2026 07:09
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
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.

2 participants