livekit / rust-sdks

LiveKit realtime and server SDKs for Rust
https://livekit.io
Apache License 2.0
212 stars 57 forks source link

Update protocol #350

Closed dennwc closed 5 months ago

dennwc commented 5 months ago

Update protocol. Quite a few changes:

I'm not sure the change for attributes is complete. I couldn't find any code that updated name or metadata based on update events. So not sure where I should add attributes updates :thinking:

theomonnom commented 5 months ago

make sure to bump minor on all affected crates. not familiar enough with the rest of the codebase to do a full review

let's not bump for this PR, we need more stuff before bumping this version

theomonnom commented 5 months ago

I'm not sure the change for attributes is complete. I couldn't find any code that updated name or metadata based on update events. So not sure where I should add attributes updates 🤔

Are you talking about these events? https://github.com/livekit/rust-sdks/blob/9c2a467751f1698532393bee95b96cba71af78b3/livekit/src/room/mod.rs#L119C5-L119C31

dennwc commented 5 months ago

These too! Need to create a new one there :+1:

But also, aren't these events supposed to update ParticipantInfo in the SDK? I haven't found any place that updates metadata based on received signaling updates.

theomonnom commented 5 months ago

Seems like we update the metadata here https://github.com/livekit/rust-sdks/blob/9c2a467751f1698532393bee95b96cba71af78b3/livekit/src/room/participant/mod.rs#L141 and for name https://github.com/livekit/rust-sdks/blob/9c2a467751f1698532393bee95b96cba71af78b3/livekit/src/room/participant/mod.rs#L134

dennwc commented 5 months ago

@theomonnom I added the update handler too. Not sure if it's a good idea to clone the new metadata for the changed callback :thinking: