Data track schema metadata - #1994
Conversation
|
size-limit report 📦
|
1egoman
left a comment
There was a problem hiding this comment.
Generally looks good to me!
|
|
||
| export const DataTrackSchemaEncoding = { | ||
| from(protocol: ProtocolDataTrackSchemaEncoding): DataTrackSchemaEncoding { | ||
| switch (protocol.value.case) { | ||
| case 'wellKnown': |
There was a problem hiding this comment.
thought: I'm a big fan of this pattern where you have a type and value which share the same name, and typescript merges them into one identifier which can be used in either context. However, @lukasIO has raised in the past this can be somewhat confusing if you don't understand what is going on.
I'll let him weigh in but I'm fine with this as is especially since it's not directly part of the external interface.
|
Longer term, I want to discuss how to get this using the Serializer type but I think that can wait until schema related serialization / deserialization is being done in other sdks. And I don't think the migration path to that would be too crazy. |
7adb080 to
c73d752
Compare
Co-authored-by: Ryan Gaus <ryan.gaus@livekit.io>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
5a5ca13 to
cf53042
Compare
Adds support for attaching schema metadata to data tracks mirroring the implementation in livekit/rust-sdks#1159.
Usage:
Note: the scope of this PR has been limited to exposing schema metadata fields; schema storage will be added in a follow-up.
Areas for reviewers to scrutinize:
Closes BOT-441