Releases: signalwire/signalwire-js
@signalwire/realtime-api v3.2.0
@signalwire/js v3.12.1
This is a maintenance release that contains a couple of minor fixes.
Fixes
@signalwire/realtime-api v3.0.1
@signalwire/js v3.11.1
This is a maintenance release that contains a couple of minor fixes.
Fixes
@signalwire/realtime-api v3.0.0
This release marks the beginning of the RELAY Realtime SDK with the integration of Voice and Messaging RELAY with our existing Realtime SDK for Video and Chat.
Highlights
Voice
You can now instantiate a Voice Client, subscribe to events, and make and answer calls. For example:
import { Voice } from '@signalwire/realtime-api';
const client = new Voice.Client({
project: '<project-id>',
token: '<project-token>',
contexts: '<context>'
});
client.on('call.received', async (call) => {
console.log('Got call', call.id, call.from, call.to, call.direction);
});
try {
const call = await client.dialPhone({
to: 'to number',
from: 'from number',
timeout: 30,
})
console.log('Dial resolved!', call.id)
} catch (error) {
console.error('Connect Error', error)
};
With Voice
, you can also
- record audio
- play audio
- listen for digits or speech using
prompt()
Messaging
You can use the same structure to instantiate a Messaging Client, subscribe to events, and send and receive messages.
import { Messaging } from '@signalwire/realtime-api';
const client = new Messaging.Client({
project: '<project-id>',
token: '<project-token>',
contexts: '<context>'
});
client.on('message.received', (message) => {
console.log('message.received', message)
})
try {
const response = await client.send({
from: '+1xxx',
to: '+1yyy',
body: 'Hello World!',
})
console.log('>> send response', response)
} catch (error) {
console.log('>> send error', error)
}
Fixes
Improvements
@signalwire/js v3.11.0
Today we are releasing version 3.11 of the JavaScript SDK. It includes fixes and minor improvements.
Fixes
- Fix to allow the JS SDK to be used in the Shadow DOM. (#497) 5560cbb
- Fix regression on
createRoomObject
method. (#494) 40d41da - Disconnect the underlay client in case of signaling and/or media errors. (#490) 53ffb3b
- Improve typings of the public interface for the Chat namespace (#532) to clarify that methods return nothing. d1073d4
- Expose all the active recordings on the
room.joined
event (#501) 5c96bf8 - Force video elements to play when paused by UA (#509) 3671a64
Improvements
@signalwire/realtime-api v3.0.0-beta.8
Beta 8 of the Realtime SDK is out! Here are the highlights for this version.
Highlights
Positions
We have introduced the concept of positions. Every video layout now has a set of predetermined positions (e.g. reserved-1, standard-1, off-cavas), to which you can assign members. For example:
await roomSession.setMemberPosition({
memberId: "1bf4d4fb-a3e4-4d46-80a8-3ebfdceb2a60",
position: "off-canvas"
})
Other methods have been updated to support positions. For example, to play a video content while setting its position:
await roomSession.play({
url: 'rtmp://example.com/foo',
positions: {
"self": "reserved-1"
}
})
Chat
You can now instantiate a Chat Client to send and receive messages to and from chat channels. You can use the same familiar interface that you may already be using in the browser SDK:
const chatClient = new Chat.Client({
project: '<project-id>',
token: '<api-token>'
})
chatClient.on('message', m => console.log(m))
await chatClient.subscribe("welcome")
New
- Exposed
setMeta
andsetMemberMeta
methods on theRoomSession
(#452)
@signalwire/js v3.10.0
Version 3.10 of the JavaScript SDK is out! Here are the main highlights.
Highlights
Positions
We have introduced the concept of positions. Every video layout now has a set of predetermined positions (e.g. reserved-1, standard-1, off-cavas), to which you can assign members. For example:
await roomSession.setMemberPosition({
memberId: "1bf4d4fb-a3e4-4d46-80a8-3ebfdceb2a60",
position: "off-canvas"
})
Other methods have been updated to support positions. For example, to share the screen while changing layout:
await roomSession.startScreenShare({
audio: true,
video: true,
layout: "screen-share",
positions: {
"self": "reserved-1"
}
})
New
- Exposed
setMeta
andsetMemberMeta
methods on theRoomSession
(#452)
Improvements
- Updated default screenShare audio constraints (#457)
Bug fixes
@signalwire/realtime-api v3.0.0-beta.7
Today we are releasing version 3.9 of the Realtime SDK.
Highlights
We have changed the way in which you instantiate a Client. Before, you would call the createClient
function, which is now deprecated. This is how you do it in the new version:
import { Video } from '@signalwire/realtime-api'
const video = new Video.Client({
project: '<project-id>',
token: '<project-token>'
})
video.on('room.started', async (roomSession) => {
console.log("Room started")
roomSession.on('member.joined', async (member) => {
console.log(member)
})
});
New features
- We now expose a
removeAllListeners
method from all our event-emitting objects. - Calling RoomSession.subscribe() is now optional. This means that you will start receiving RoomSession events as soon as you subscribe to them.
@signalwire/js v3.9.0
Today we are releasing version 3.9 of the JavaScript SDK.
Highlights
We have added a helper function for measuring the volume of the audio from the microphones. You can use this to allow the user to check that the devices are working properly. For example:
const micAnalyzer = await createMicrophoneAnalyzer('device-id')
micAnalyzer.on('volumeChanged', (vol) => {
console.log("Volume: ", vol)
})
micAnalyzer.on('destroyed', (reason) => {
console.log('Microphone analyzer destroyed', reason)
})
micAnalyzer.destroy()
New features
- We now expose a
removeAllListeners
method from all our event-emitting objects.
Fixes
- We removed an obsolete console warning which was triggered for the previously experimental Chat feature.