Skip to content

Releases: signalwire/signalwire-js

@signalwire/js v3.17.0

23 Nov 10:38
Compare
Choose a tag to compare

The latest version of the JavaScript SDK is out. It has mostly fixes and a minor improvement.

Improvements

  • Added a permissions property on the Video RoomSession object to list the permissions available to the member. c1b5025

Fixes

  • Fixed layout.changed types for consistent casing. 7a867dc
  • Fixed localVideo overlay updates when leaving and rejoining the same Video room. 37ab859
  • We have fixed types on the room.joined event to include all of the payload properties on the event. 6239655
  • We now use a ResizeObserver to detect root element changes and adapt Video room displays to fix an occasional issue with the footer floating in video content. 8dc3d43

@signalwire/realtime-api v3.5.1

06 Oct 21:31
53a55d6
Compare
Choose a tag to compare

Version 3.5.1 is a minor release that contains a couple of fixes.

Fixes

We have updated the objects returned by getRecordings, getPlaybacks, and getStreams to ensure they include room_session_id. 50f2e07

We fixed a race condition on auto-connect Clients. 31af820

@signalwire/js v3.16.0

06 Oct 21:34
53a55d6
Compare
Choose a tag to compare

Version 3.16.0 is a minor release that contains a couple of fixes and improvements.

Improvements

  • We have enhanced the Video roomSession.join() signature with an optional argument to control the sending and receiving of media. baf34a8

  • The JavaScript SDK now exposes .disconnect() on PubSub and Chat clients. 8132100

Deprecations

  • Setting the audio and video properties in the RoomSession constructor has been deprecated. Specify them in the join method instead.

Fixes

  • We fixed the updateCamera and updateMicrophone logic to apply room changes to the localStream. 64e13ec

@signalwire/realtime-api v3.5.0

21 Sep 17:05
Compare
Choose a tag to compare

Version 3.5 of the Realtime SDK is here! Highlights include RTMP outbound streaming and methods to retrieve metadata in video rooms.

Highlights

Outbound Streaming

We are excited to offer RTMP streaming out of video rooms with the addition of several methods and events! f1102bb

New Methods

  • roomSession.startStream() starts streaming the audio and video of the current room to an external service such as Facebook or YouTube. You can use the returned RoomSessionStream object to interact with the stream.
const stream = await roomSession.startStream({ url: "rtmp://example.com" });
// Stop the stream after 60 seconds
setTimeout(() => stream.stop(), 60000);
  • roomSessionStream.stop() is a method on the RoomSessionStream object returned from the startStream method and is used to stop the stream.
await stream.stop()
  • roomSession.getStreams() obtains a list of active streams for the current RoomSession.
const s = await roomSession.getStreams();
for (const stream of s.streams) {
  console.log(stream.id, stream.url);
}

New Events

  • stream.started
  • stream.ended

Emitted when a stream is started or stopped, respectively. Your event handler receives a stream object of the RoomSessionStream type.

Getting Metadata

Our last release included methods to manage metadata on Video Room sessions and the members in the session. Today, we are introducing methods to retrieve the metadata for the room session and a member. 6cf01e1

  • getMeta will return the metadata assigned to the current room session. For example:
const { meta } = await room.getMeta();
console.log(meta);
  • getMemberMeta will return the metadata assigned to a specified member. If a member id is not passed, this method will return the metadata from the current member. For example:
const { meta } = await room.getMemberMeta({ memberId: 'ab123c0c-4fac-5def-b06f-d5b8614b8999' });
console.log(meta);

@signalwire/js v3.15.0

21 Sep 17:05
Compare
Choose a tag to compare

Today, we are releasing version 3.15 of the JavaScript SDK which includes RTMP outbound streaming, more metadata management methods, and a few miscellaneous fixes.

Highlights

Outbound Streaming

We are excited to offer RTMP streaming out of video rooms with the addition of several methods and events! f1102bb

New Methods

  • roomSession.startStream() starts streaming the audio and video of the current room to an external service such as Facebook or YouTube. You can use the returned RoomSessionStream object to interact with the stream.
const stream = await roomSession.startStream({ url: "rtmp://example.com" });
// Stop the stream after 60 seconds
setTimeout(() => stream.stop(), 60000);
  • roomSessionStream.stop() is a method on the RoomSessionStream object returned from the startStream method and is used to stop the stream.
await stream.stop()
  • roomSession.getStreams() obtains a list of active streams for the current RoomSession.
const s = await roomSession.getStreams();
for (const stream of s.streams) {
  console.log(stream.id, stream.url);
}

New Events

  • stream.started
  • stream.ended

Emitted when a stream is started or stopped, respectively. Your event handler receives a stream object of the RoomSessionStream type.

Getting Metadata

Our last release included methods to manage metadata on Video Room sessions and the members in the session. Today, we are introducing methods to retrieve the metadata for the room session and a member. 6cf01e1

  • getMeta will return the metadata assigned to the current room session. For example:
const { meta } = await room.getMeta();
console.log(meta);
  • getMemberMeta will return the metadata assigned to a specified member. If a member id is not passed, this method will return the metadata from the current member. For example:
const { meta } = await room.getMemberMeta({ memberId: 'ab123c0c-4fac-5def-b06f-d5b8614b8999' });
console.log(meta);

Fixes

  • Restore timestamps on browser logs. 577e81d
  • Dispatch member.updated event in case of the local cache is empty. 0e7bffd
  • Set width: 100% on contentWrapper to always give size to the MCU. 1ba9daa

@signalwire/realtime-api v3.4.0

17 Aug 14:13
b5cb0b7
Compare
Choose a tag to compare

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

@signalwire/js v3.14.0

17 Aug 14:13
b5cb0b7
Compare
Choose a tag to compare

Today we are releasing version 3.14 of the JavaScript SDK. There are several improvements and fixes. Here are the highlights.

Highlights

getAllowedChannels in PubSub and Chat

The new method getAllowedChannels is available to PubSub and Chat namespaces. d8cf078

It returns the channels that the current token allows you to subscribe to as well as the permissions you have for each channel. The return is structured as an object whose keys are the channel names and whose values are the permissions. For example:

{
  "channel-1": { "read": true, "write": false },
  "channel-2": { "read": true, "write": true },
}

Methods to 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
  • Changed handling of the auto managed rootElement to avoid mutating its styles. 24e956a
  • Reviewed socket closed event handling to improve connection retries. 7bdd7ab

Fixes

  • When destroying the client, added a short delay to allow all of the sagas to complete their tasks.. 7b19610

@signalwire/realtime-api v3.3.1

28 Jul 17:27
0e06fb1
Compare
Choose a tag to compare

This is a small maintenance release.

Improvements

  • Improved auto-subscribe logic in Video and PubSub namespaces. 6bc89d8

Fixes

  • Fixed missing export for DeviceBuilder. b2abd7a

@signalwire/realtime-api v3.3.0

14 Jul 21:19
0d2eefb
Compare
Choose a tag to compare

Today we are releasing version 3.3 of the Realtime SDK. It consists of a couple of improvements and fixes.

Highlights

Video Playback

We have exposed methods to seek a specific video position during playback. d308daf
These include:

  • playback.seek(timecode) seeks the current playback time to the specified absolute position.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.seek(30_000); // 30th second
  • playback.forward(offset) seeks the current playback time forward by the specified offset.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.forward(5000); // 5 seconds
  • playback.rewind(offset) seeks the current playback time backward by the specified offset.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.rewind(5000); // 5 seconds

Note that the boolean property seekable has been added to RoomSessionPlayback to support these methods.

Improvements

  • Removed the option to pass volume from methods of Voice.Playlist typings. 9eb9851

Fixes

  • Fixed issue with missing member.update events. 8ec914b

@signalwire/js v3.13.0

14 Jul 20:28
0d2eefb
Compare
Choose a tag to compare

Version 3.13 of the JavaScript SDK is out! We have added a couple of improvements. Here are the highlights.

Highlights

RoomSession event room.left

  • We have added a new event room.left which allows users to listen for when a RoomSession's creator leaves the RoomSession. 20f61a7
    For example:
room.on("room.left", () => {
      console.log("You have left the room.")
});

Video Playback

We have exposed methods to seek a specific video position during playback. d308daf
These include:

  • playback.seek(timecode) seeks the current playback time to the specified absolute position.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.seek(30_000); // 30th second
  • playback.forward(offset) seeks the current playback time forward by the specified offset.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.forward(5000); // 5 seconds
  • playback.rewind(offset) seeks the current playback time backward by the specified offset.
const playback = await roomSession.play({ url: "rtmp://example.com/foo" });
await playback.rewind(5000); // 5 seconds

Note that the boolean property seekable has been added to RoomSessionPlayback to support these methods.

Improvements

  • Enabled pingSupported by default for all WebRTC Connections to check for disconnected participants. 4300716

Fixes

  • Patch to address occasional screen share hangups. bbc21e4