Skip to main content

RELAY JS SDK 3.15.0 Release

· 2 min read
Renae Sowald

We are happy to announce JavaScript SDK 3.15.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

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