Skip to main content

RELAY JS SDK 3.22.0 Release

· One min read
Renae Sowald

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

Improvements

  • New events keep track of the connected devices' status. e8141c0e

We have added updated and disconnected events for microphone, camera, and speaker devices. When listening for microphone update events with

const roomSession = new Video.RoomSession({
host: YOUR_HOST,
token: YOUR_TOKEN,
...
})
roomSession.on('microphone.updated', (payload) => {
console.debug('>> microphone.updated', payload)
});
roomSession.on('microphone.disconnected', (payload) => {
console.debug('>> microphone.disconnected', payload)
});

you will receive the following event payload if a microphone is updated:

{
previous: {
label: 'microphone array',
deviceId: '35e85417-09cf-4b07-8f21-d3c16809e5a8'
},
current: {
label: 'headset',
deviceId: '4a829c9f-812c-49d7-b272-e3077213c55e'
},
}

If the microphone is then disconnected, you will receive the following event:

{
label: 'headset',
deviceId: '4a829c9f-812c-49d7-b272-e3077213c55e'
}