Repository navigation
Add LocalParticipant.sendBytes - #750
Merged
Merged
Conversation
Mirrors python-sdks send_bytes: sends a complete in-memory buffer through the FFI StreamSendBytes request so short payloads can be inlined and larger ones compressed, instead of callers going through streamBytes or a temp file with sendFile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 1b6e3ec The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1egoman
force-pushed
the
add-send-bytes
branch
from
October 20, 2026 22:51
5ea52bf to
a5d9c04
Compare
Matches python-sdks send_bytes, which takes no progress callback. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1egoman
marked this pull request as ready for review
October 20, 2026 22:54
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
lukasIO
approved these changes
Oct 21, 2026
Handle the expected result case, the error case, and any unexpected case explicitly instead of collapsing everything non-success into 'unknown error'. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
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.
Adds
LocalParticipant.sendBytes(data, options), the node counterpart of python-sdks'send_bytes(livekit/python-sdks#858).It sends an in-memory
Uint8Arrayas a complete byte stream in a singleStreamSendBytesRequest. WithstreamBytes()every payload costs a header, a chunk and a trailer. Here the whole payload is known up front, so short payloads can go out as a single packet and larger ones can be compressed, as long as every recipient supports it. It returns the resultingByteStreamInfo, just assendTextreturns its info.This replaces the workaround in livekit/agents-js#2769, which wrote each message to a temp file so it could use
sendFile's one-shot path.Options:
topic,name(defaults to"unknown"),mimeType(defaults to"application/octet-stream"),attributes,destinationIdentities,streamId,compress(defaults to true).No bindings bump is needed:
StreamSendBytes*is already in@livekit/rtc-ffi-bindings0.12.73.Testing
sends and receives a small in-memory buffer via sendBytes(port of python'stest_send_bytes_small). It checks the returned info and the round trip.livekit-server --dev, and both passed.🤖 Generated with Claude Code