Conversation
…r<A | B> type signatures
…in Throws wherever possible This is a LOT cleaner!
…r boundary in RemoteDataTrack too
…er handle subscription cancellation
…hrows-transformer features
…ror to throw here.
this.localParticipant = new LocalParticipant(...) takes the outgoing data track manager, which needs the e2ee manager, and the e2ee manager can only be constructed if this.localParticipant is set.
This is copied from livekit/rust-sdks@ccdc012
Been writing a little too much rust lately...
6a5960d to
2e6f8cf
Compare
lukasIO
reviewed
Mar 10, 2026
lukasIO
reviewed
Mar 10, 2026
| */ | ||
| waitUntilExists(key: K): Promise<V>; | ||
| waitUntilExists(key: K, signal: AbortSignal): Promise<Throws<V, WaitableMapAbortError>>; | ||
| async waitUntilExists(key: K, signal?: AbortSignal) { |
Contributor
There was a problem hiding this comment.
nit: naming
alternative suggestions:
await(key)getAsync(key)
My take is that await(key) might be the cleanest. The getAsync isn't really a common pattern in JS.
Contributor
Author
There was a problem hiding this comment.
I will admit, I am not a big fan of either of those naming suggestions. To me await on its own doesn't make it clear that there is "getting a key" involved, and I also am not a super big fan of the repetition of await map.await("key").
Just to throw a few more options out there to see if we can find one we both like, here's some more potential options from a LLM:
resolve(key)— Borrows from Promise terminology; implies the value will materialize.getDeferred(key)— Concise, borrows from the well-understood deferred/promise pattern.getEventually(key)— A little whimsical but honest about what's happening.getWhenAvailable(key)— Very explicit and self-documenting, though a bit long.getWhen(key)— Reads as "get when available," compact shortening of the above.getOnce(key)— Reads as "get once it's ready."
Thoughts on any of those?
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.
Integrates the data track managers (both incoming and outgoing) into the existing sdk
RoomandRemoteParticipantinterfaces. Once this is merged, data tracks is fully implemented!NOTE: This pull request is based on top of the
data-track-incoming-managerbranch and the diff will be weird until that one is merged here.Interface - Publishing
Interface - Subscribing
Todo: