RELAY Realtime SDK 3.4.0
· 2 min read
We are happy to announce Realtime-API SDK 3.4.0.
Upgrading is straightforward with our release process, which adheres to Semantic Versioning. Minor versions are guaranteed to not have breaking changes, so you can upgrade with confidence.
Version 3.4.0 of the Realtime SDK is here! We have added several methods, improved event handling, and fixed some bugs. Here are the highlights.
Highlights
Manage Metadata
We have added several new methods to manage metadata in a Video room session. d7ce34d
roomSession.updateMeta
updates the room's metadata only in specified fields. This is different from the existing methodsetMeta
which replaces the whole metadata object.roomSession.deleteMeta
deletes specific keys from the metadata of the current room session.roomSession.updateMemberMeta
updates a member's metadata only in specified fields. The existing methodsetMemberMeta
replaces the whole metadata object.roomSession.deleteMemberMeta
deletes specific keys from the metadata of the desired member.
These four methods work similarly. Let's look at updateMeta
as an example.
roomSession.on("room.updated", (e) => {
// We can set an event listener to log changes to the metadata.
console.log(e.room.meta);
});
await roomSession.setMeta({ foo: "bar", baz: true });
// The log will print { foo: "bar", baz: true },
await roomSession.updateMeta({ baz: false, t: 10 });
// After the call to `updateMeta` our log will print { foo: "bar", baz: false, t: 10 }.
Note that for any of these methods, you must specify the room.set_meta
permission when creating the Video Room Token.
Other Improvements
- Updated
RoomSession.getRecordings
andRoomSession.getPlaybacks
to return stateful objects and deprecatedRoomSession.recordings
in favour of the getter methods. eb1c3fe - Exposed
client.disconnect()
methods on all of the client objects in Video, Chat, PubSub, Task, Voice, and Messaging. 7b19610 - Reviewed socket closed event handling to improve connection retries. 7bdd7ab