All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
-
#956
e16ec479
Thanks @iAmmar7! - Introduce Conversation API with Conversation Subscriber -
#1001
968d226b
Thanks @ayeminag! - - API to fetch address by id and tests -
#995
c370fec8
Thanks @iAmmar7! - CF SDK: Fetch subscriber info function -
#973
c8deacef
Thanks @iAmmar7! - Online/offline registeration for WebRTC endpoint -
#999
6d71362b
Thanks @ayeminag! - -client.conversations.sendMessage()
conversation.sendMessage()
API for conversation object returned fromgetConversations()
APIconversation.getMessages()
API for conversation object returned fromgetConversations()
- added e2e tests for conversation (room)
-
#1012
45991e4c
Thanks @iAmmar7! - CF SDK: Cleanup unified eventing -
#982
ded3dc7a
Thanks @iAmmar7! - CF SDK: OAuth refresh token -
#978
0f4f2b3c
Thanks @iAmmar7! - Introduce pageSize param for Conversation APIs -
#1030
254016f3
Thanks @iAmmar7! - Destroy the workers after a successful verto.bye -
#992
3d20672b
Thanks @iAmmar7! - Fix room session id usage in room worker -
#983
3d6a4fbe
Thanks @iAmmar7! - Introduce CallSegment and CallFabric worker -
#960
184c8777
Thanks @iAmmar7! - Introduce member instance in CF SDK -
#1050
229320b3
Thanks @iAmmar7! - Introducing Call Fabric client -
#1017
d215ef5d
Thanks @iAmmar7! - CF SDK: Improve the action invoke strategy
-
#881
b39b82fe
Thanks @iAmmar7! - New interface for Voice APIsThe new interface contains a single SW client with Chat and PubSub namespaces
import { SignalWire } from '@signalwire/realtime-api' (async () => { const client = await SignalWire({ host: process.env.HOST, project: process.env.PROJECT, token: process.env.TOKEN, }) const unsubVoiceOffice = await client.voice.listen({ topics: ['office'], onCallReceived: async (call) => { try { await call.answer() const unsubCall = await call.listen({ onStateChanged: (call) => {}, onPlaybackUpdated: (playback) => {}, onRecordingStarted: (recording) => {}, onCollectInputStarted: (collect) => {}, onDetectStarted: (detect) => {}, onTapStarted: (tap) => {}, onPromptEnded: (prompt) => {} // ... more call listeners can be attached here }) // ... await unsubCall() } catch (error) { console.error('Error answering inbound call', error) } } }) const call = await client.voice.dialPhone({ to: process.env.VOICE_DIAL_TO_NUMBER as string, from: process.env.VOICE_DIAL_FROM_NUMBER as string, timeout: 30, listen: { onStateChanged: async (call) => { // When call ends; unsubscribe all listeners and disconnect the client if (call.state === 'ended') { await unsubVoiceOffice() await unsubVoiceHome() await unsubPlay() client.disconnect() } }, onPlaybackStarted: (playback) => {}, }, }) const unsubCall = await call.listen({ onPlaybackStarted: (playback) => {}, onPlaybackEnded: (playback) => { // This will never run since we unsubscribe this listener before the playback stops }, }) // Play an audio const play = await call.playAudio({ url: 'https://cdn.signalwire.com/default-music/welcome.mp3', listen: { onStarted: async (playback) => { await unsubCall() await play.stop() }, }, }) const unsubPlay = await play.listen({ onStarted: (playback) => { // This will never run since this listener is attached after the call.play has started }, onEnded: async (playback) => { await call.hangup() }, }) })
-
#881
b39b82fe
Thanks @iAmmar7! - - New interface for the realtime-api Video SDK.- Listen function with video, room, playback, recording, and stream objects.
- Listen param with
room.play
,room.startRecording
, androom.startStream
functions. - Decorated promise for
room.play
,room.startRecording
, androom.startStream
functions.
import { SignalWire } from '@signalwire/realtime-api' const client = await SignalWire({ project, token }) const unsub = await client.video.listen({ onRoomStarted: async (roomSession) => { console.log('room session started', roomSession) await roomSession.listen({ onPlaybackStarted: (playback) => { console.log('plyaback started', playback) }, }) // Promise resolves when playback ends. await roomSession.play({ url: 'http://.....', listen: { onEnded: () => {} }, }) }, onRoomEnded: (roomSession) => { console.log('room session ended', roomSession) }, })
-
#881
b39b82fe
Thanks @iAmmar7! - New interface for PubSub and Chat APIsThe new interface contains a single SW client with Chat and PubSub namespaces
import { SignalWire } from '@signalwire/realtime-api' ;(async () => { const client = await SignalWire({ host: process.env.HOST, project: process.env.PROJECT, token: process.env.TOKEN, }) // Attach pubSub listeners const unsubHomePubSubListener = await client.pubSub.listen({ channels: ['home'], onMessageReceived: (message) => { console.log('Message received under the "home" channel', message) }, }) // Publish on home channel await client.pubSub.publish({ content: 'Hello There', channel: 'home', meta: { fooId: 'randomValue', }, }) // Attach chat listeners const unsubOfficeChatListener = await client.chat.listen({ channels: ['office'], onMessageReceived: (message) => { console.log('Message received on "office" channel', message) }, onMemberJoined: (member) => { console.log('Member joined on "office" channel', member) }, onMemberUpdated: (member) => { console.log('Member updated on "office" channel', member) }, onMemberLeft: (member) => { console.log('Member left on "office" channel', member) }, }) // Publish a chat message on the office channel const pubRes = await client.chat.publish({ content: 'Hello There', channel: 'office', }) // Get channel messages const messagesResult = await client.chat.getMessages({ channel: 'office', }) // Get channel members const getMembersResult = await client.chat.getMembers({ channel: 'office' }) // Unsubscribe pubSub listener await unsubHomePubSubListener() // Unsubscribe chat listener await unsubOfficeChatListener() // Disconnect the client client.disconnect() })()
-
#881
b39b82fe
Thanks @iAmmar7! - New interface for the Messaging APIThe new interface contains a single SW client with Messaging namespace
const client = await SignalWire({ host: process.env.HOST || 'relay.swire.io', project: process.env.PROJECT as string, token: process.env.TOKEN as string, }) const unsubOfficeListener = await client.messaging.listen({ topics: ['office'], onMessageReceived: (payload) => { console.log('Message received under "office" context', payload) }, onMessageUpdated: (payload) => { console.log('Message updated under "office" context', payload) }, }) try { const response = await client.messaging.send({ from: process.env.FROM_NUMBER_MSG as string, to: process.env.TO_NUMBER_MSG as string, body: 'Hello World!', context: 'office', }) await client.messaging.send({ from: process.env.FROM_NUMBER_MSG as string, to: process.env.TO_NUMBER_MSG as string, body: 'Hello John Doe!', }) } catch (error) { console.log('>> send error', error) }
-
#881
b39b82fe
Thanks @iAmmar7! - Decorated promise for the following APIs:- call.play()
- call.playAudio()
- call.playSilence()
- call.playRingtone()
- call.playTTS()
- call.record()
- call.recordAudio()
- call.prompt()
- call.promptAudio()
- call.promptRingtone()
- call.promptTTS()
- call.tap()
- call.tapAudio()
- call.detect()
- call.amd()
- call.detectFax()
- call.detectDigit
- call.collect()
Playback example 1 - Not resolving promise
const play = call.playAudio({ url: '...' }) await play.id
Playback example 2 - Resolving promise when playback starts
const play = await call.playAudio({ url: '...' }).onStarted() play.id
Playback example 3 - Resolving promise when playback ends
const play = await call.playAudio({ url: '...' }).onEnded() play.id
Playback example 4 - Resolving promise when playback ends - Default behavior
const play = await call.playAudio({ url: '...' }) play.id
All the other APIs work in a similar way.
- call.play()
-
#881
b39b82fe
Thanks @iAmmar7! - Task namespace with new interface
-
#921
03f01c36
Thanks @jpsantosbh! - support for eventing acknowledge -
#948
6cb639bf
Thanks @iAmmar7! - Allow user to pass filters togetAddress
functionconst addressData = await client.getAddresses({ type: 'room', displayName: 'domain app', })
-
#909
4ee7b6f8
Thanks @iAmmar7! - Expose thesendDigits
function for Video RoomSession object -
#873
6c9d2aa5
Thanks @iAmmar7! - Introduce the hand raise API for the Video SDKs (browser and realtime-api)
- #892
d564c379
Thanks @ayeminag! - - Addedstate
param toCallingCallCollectEventParams
- Made sure
voiceCallCollectWorker
doesn't clean upCallCollect
instance and emitended
/failed
event if thestate
is"collecting"
- Resolve
CallCollect.ended()
promise only whenstate
is NOT"collecting"
ANDfinal
is eitherundefined
/true
ANDresult.type
is one ofENDED_STATES
- Added more test cases for
Call.collect()
in@sw-internal/e2e-realtime-api
- Made sure
- #885
bcced8ae
Thanks @edolix! - Bugfix: remove video prefix from member.updated events to emit them properly
-
#866
1086a1b0
- ExposedetectInterruptions
params for detect methods and handlebeep
in the detect events -
#863
fb45dce7
- Add support for CallRecordingpause()
andresume()
-
#853
5e1ff117
- Enhance shared function between realtime and browser SDK -
#853
5e1ff117
- Introduce the session emitter and eliminate the global emitter -
#853
5e1ff117
- Cleanup the SDK by removing eventsPrefix from the namespaces -
#853
5e1ff117
- Attach listeners without the namespace prefix -
#853
5e1ff117
- Cleanup the SDK by removing applyEmitterTransform -
#862
2a9b88d9
- Update contract types for CallDetect adding aresult
getter. -
#853
5e1ff117
- Remove event emitter transform pipeline from browser SDK
-
#827
6a35f0a3
- Introduceawait call.pass()
function to pass the call to another consumer -
#822
65b0eea5
- Initial changes to setup aSignalWire
client for CF.
-
#805
e8141c0e
- Events to keep track of the connected devices status -
#821
4e1116b6
- Add support forcallStateUrl
andcallStateEvents
when dialing and connecting Voice Call.
-
#776
602921a6
- Internal changes to opt-out from EmitterTransforms. -
#776
602921a6
- Use instance map for Voice APIs instance creation.
-
#811
f3711f17
- Improve reconnection under bad network conditions. -
#776
602921a6
- Handle failed state forcall.connect
events.
-
#778
aa31e1a0
- Add support for maxPricePerMinute indial
andconnect
for the Voice Call object. -
#793
4e8e5b0d
- Update speech interface for Collect and Prompt to setmodel
.
-
#664
bc56cc42
- Add optional arguments onpromote
to pass meta, joinAudioMuted and joinVideoMuted. Add optionalmeta
argument fordemote
. -
#664
bc56cc42
- Expose theroom.audience_count
event on the RoomSession.
-
#664
bc56cc42
- Removepermissions
from the valid arguments of thedemote()
method on RoomSession. -
#738
ba39c819
- Make base session accessible to custom saga workers -
#758
688306f4
- DeprecatecurrentTimecode
in the params ofRoomSession.play()
and replace withseekPosition
. -
#738
ba39c819
- Remove executeActionWatcher and related functions -
#664
bc56cc42
- Removemeta
from the allowed parameters ofdemote
. -
#738
ba39c819
- Introduce a new worker to decoupleexecuteAction
requests from Redux store
-
#747
95325ec9
- Changes to support connecting using SAT and join a video room. -
#722
bbb9544c
- Consider all 2xx codes as a success response -
#727
bb216980
- Valid typescript interface forcall.collect
method. -
#569
0bdda948
- Internal changes to persist and useauthorization.state
events.
-
#732
9ad158b9
- Emitplayback.failed
event on playback failure Resolve the playback.ended()
promise in case of Playback failure Resolve the playback.ended()
promise in case of Prompt failure Resolve the playback.ended()
promise in case of Recording failure Resolve the playback.ended()
promise in case of Detect failure Resolve the playback.ended()
promise in case of Collect failure Resolve the playback.ended()
promise in case of Tap failure -
#711
45536d5f
- Fix error on exposing thestate
property on the Voice Call object. -
#745
55a309f8
- Usereject
instead of throw within Promise for Video methods.
-
#729
41482813
- Allow WebRTC connection to reconnect after a network change or temporary blip. -
#723
e2c475a7
- Accept sessionTimeout as a SIP call parameter
- #686
c82e6576
- Review internals to always reconnect the SDKs expect for when the user disconnects the clients.
021d9b83
- FixtoSnakeCaseKeys
util and fixlanguage
type in the Prompt params.
-
#641
569213c8
- Move debounce implementation fromrealtime-api
tocore
. -
#630
577e81d3
- [internal] Export ReduxComponent from core and use it on webrtc to make explicit. -
#631
c00b343e
- [internal] Update interfaces for the Authorization block.
- #619
d7ce34d3
- Add methods to manage a RoomSession and Membermeta
:updateMeta
,deleteMeta
,setMemberMeta
,updateMemberMeta
,deleteMemberMeta
.
-
#610
eb1c3fe9
- Updated interfaces to match the spec, updateRoomSession.getRecordings
andRoomSession.getPlaybacks
to return stateful objects, deprecatedRoomSession.members
andRoomSession.recordings
in favour of their corresponding getters. -
#589
fa62d67f
- Internal changes to update media_allowed, video_allowed and audio_allowed values for joinAudience.
- #616
81503784
- Change internal implementation ofChat.getAllowedChannels
to wait for the session to be authorized.
-
#557
f15032f1
- Add ability to track the Authorization state. -
#552
b168fc4f
- Add support for internal ping/pong at the signaling level.
- #546
fc4689df
- Internal change to migrate fromsetWorker
/attachWorker
torunWorkers
and frompayload
toinitialState
.
- #554
1b95b93b
- Fix issue with local streams for when the user joined with audio/video muted. Update typings to match the BE
- #460
7e64fb28
- Iinitial implementation of theVoice
namespace. Adds ability to make outbound calls.
- #477
c6beec6d
- AddwaitForEnded()
method to the CallPlayback component to easily wait for playbacks to end.
- #539
4c0909dd
- Rename Call methodwaitUntilConnected
towaitForDisconnected
and exposedisconnect
on the VoiceClient.
- #529
e09afd5b
- Renamed Dialer to DeviceBuilder, added ability to passregion
todialPhone
anddialSip
- #484
a9abe1d5
- Keep internal memberList data up to date to generate synthetic events with the correct values.
-
#456
c487d29b
- Add ability to handle member'scurrentPosition
. -
#401
46600032
- Addlayout
andpositions
when starting a screenShare. -
#468
058e9a0c
- Re-exportedChatMember
andChatMessage
from the top-level namespace -
#452
563a31e5
- ExposesetMeta
andsetMemberMeta
methods on theRoomSession
.
-
#400
3f851e2a
- Expose chat member events:member.joined
,member.updated
andmember.left
. -
#407
7c688bb5
- Add encode/decode protected methods to BaseSession to allow override. -
#415
6d94624b
- Add transformParams to ExecuteExtendedOptions. -
#424
743168df
- Add support forupdateToken
to the Chat.Client to allow renew tokens for a chat session.
- #297
2675e5e
- Add support for the Playback APIs:roomSession.play()
and theRoomSessionPlayback
object to control it.
-
#310
3af0ea6
- Improve typings for the PubSub channel and when finding the namespace from the payload. Fix usages ofroom
forroom_session
. -
#305
cec54bd
- Convert timestamp properties toDate
objects. -
#302
2ac7f6d
- AddedsetInputVolume
/setOutputVolume
and markedsetMicrophoneVolume
/setSpeakerVolume
as deprecated. -
#311
febb842
- UpdateConsumerContract
interface and add array-keys to the toExternalJSON whitelist. -
#300
b60e9fc
- Improve the logic for applying local and remote emitter transforms. -
#298
49b4aa9
- Refactoring: Normalize usage of events to always use our "internal" version for registering, transforms, caching, etc.
- #273
249facf
- Addedmember.talking.started
,member.talking.ended
and deprecatedmember.talking.start
andmember.talking.stop
for consistency.
-
#271
e6233cc
- Bugfix on the internal EventEmitter where, in a specific case, the.off()
method did not remove the listener. Improved test coverage. -
#277
5b4e57d
- FixvalidateEventsToSubscribe
method to check the prefixed-event.
-
#246
97dacbb
- Add typings for the RealTime video and room event listeners. -
#243
e45c52c
- Allow to set the logger level vialogLevel
argument on theUserOptions
interface.
- #236
b967c89
- Applyaudio
andvideo
constraints sent from the backend consuming themediaParams
event.
-
#158
4524780
- Updated connect to support component and session listeners -
#167
f6b8b10
- Encapsulate each EventEmitter using a unique id as the namespace.
- #163
b1f3d45
- Add ability to queue execute actions based on the user's auth status. Add ability to track how many times the user has been reconnected. Improve reconnecting logic.
-
#214
ec49478
- Includedcommonjs
versions intojs
andwebrtc
packages -
#155
45e6159
- Emit "member.talking.start" and "member.talking.stop" in addition of "member.talking"
- ec49478: Included
commonjs
versions intojs
andwebrtc
packages
- ef1964c: Export types/interfaces for Room events
- 2c89dfb: Deprecated
getLayoutList
andgetMemberList
in favour ofgetLayouts
andgetMembers
respectively. Other methods (audioMute
,audioUnmute
,deaf
,hideVideoMuted
,removeMember
,setInputSensitivity
,setLayout
,setMicrophoneVolume
,setSpeakerVolume
,showVideoMuted
,undeaf
,videoMute
,videoUnmute
) that were previously returning{ code: string, message: string }
also went through a signature change and are now returningPromise<void>
- 6995825: Standardize naming for store actions
- 8bb4e76: Split Room objects into Room, RoomDevice and RoomScreenShare with specific methods for each use case
- f6b8b10: Encapsulate each EventEmitter using a unique id as the namespace.
- 12178ce: Internal refactor for creating destroyable slices without repetition.
- b1f3d45: Add ability to queue execute actions based on the user's auth status. Add ability to track how many times the user has been reconnected. Improve reconnecting logic.
- 8e08e73: Bump @reduxjs/toolkit to latest
- 4524780: Updated connect to support component and session listeners
- 399d213: Expose createScreenShareObject() method to share the screen in a room
- d84f142: Fix session reconnect logic
- a5ef49a: Expose "member.talking" event
- 22b61d3: Rename some internal objects and review the public exports
- 5820540: Change package "exports" definition
- 45e6159: Emit "member.talking.start" and "member.talking.stop" in addition of "member.talking"
- 95df411: Renamed internal sessions classes, Bundled core dependencies
- 703ee44: Update RoomLayout interfaces and events payloads
- fe0fe0a: Initial beta release of SignalWire JS SDK