Skip to main content

RELAY Realtime SDK 3.4.0

· 2 min read
Renae Sowald

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.

SignalWire Release Card

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 method setMeta 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 method setMemberMeta 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 and RoomSession.getPlaybacks to return stateful objects and deprecated RoomSession.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

Fixes

  • Always connect the lower-level client without waiting for an event listener. 7b19610
  • Removed updateToken method and session.expiring event from the Realtime API Chat and PubSub because they only need to be accessed from the JavaScript API. f421f92