diff --git a/.changeset/beige-tomatoes-own.md b/.changeset/beige-tomatoes-own.md deleted file mode 100644 index 875a48d2f..000000000 --- a/.changeset/beige-tomatoes-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/core': minor ---- - -support for eventing acknowledge diff --git a/.changeset/brave-monkeys-wink.md b/.changeset/brave-monkeys-wink.md deleted file mode 100644 index 4b821bd44..000000000 --- a/.changeset/brave-monkeys-wink.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@sw-internal/e2e-realtime-api': patch -'@signalwire/realtime-api': patch ---- - -Fix collect e2e tests diff --git a/.changeset/cuddly-carrots-bathe.md b/.changeset/cuddly-carrots-bathe.md deleted file mode 100644 index 5693e7742..000000000 --- a/.changeset/cuddly-carrots-bathe.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -New interface for Voice APIs - -The new interface contains a single SW client with Chat and PubSub namespaces -```javascript -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() - }, - }) - -}) -``` \ No newline at end of file diff --git a/.changeset/dry-queens-tap.md b/.changeset/dry-queens-tap.md deleted file mode 100644 index 0c4f75c3f..000000000 --- a/.changeset/dry-queens-tap.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@signalwire/core': patch -'@signalwire/js': patch ---- - -Allow user to pass filters to `getAddress` function - - -```js -const addressData = await client.getAddresses({ - type: 'room', - displayName: 'domain app', -}) -``` \ No newline at end of file diff --git a/.changeset/fluffy-birds-yawn.md b/.changeset/fluffy-birds-yawn.md deleted file mode 100644 index 213470334..000000000 --- a/.changeset/fluffy-birds-yawn.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -- 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`, and `room.startStream` functions. -- Decorated promise for `room.play`, `room.startRecording`, and `room.startStream` functions. - -```js -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) - } -}) -``` \ No newline at end of file diff --git a/.changeset/hip-bobcats-hear.md b/.changeset/hip-bobcats-hear.md deleted file mode 100644 index 8ec756351..000000000 --- a/.changeset/hip-bobcats-hear.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -New interface for PubSub and Chat APIs - -The new interface contains a single SW client with Chat and PubSub namespaces -```javascript -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() -})(); -``` \ No newline at end of file diff --git a/.changeset/lovely-tigers-breathe.md b/.changeset/lovely-tigers-breathe.md deleted file mode 100644 index af612a872..000000000 --- a/.changeset/lovely-tigers-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/realtime-api': patch ---- - -Fix `onStarted` function in decorated promises diff --git a/.changeset/mean-rockets-wait.md b/.changeset/mean-rockets-wait.md deleted file mode 100644 index 535ca7363..000000000 --- a/.changeset/mean-rockets-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/webrtc': patch ---- - -FIXED include a media track in a sdp answer only when the peer offer have the same media diff --git a/.changeset/red-hairs-work.md b/.changeset/red-hairs-work.md deleted file mode 100644 index 0f9804d0e..000000000 --- a/.changeset/red-hairs-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/realtime-api': patch ---- - -Fix tap.started event on Tap instance diff --git a/.changeset/shaggy-jobs-confess.md b/.changeset/shaggy-jobs-confess.md deleted file mode 100644 index dc1449580..000000000 --- a/.changeset/shaggy-jobs-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/realtime-api': patch ---- - -Add missing getter for member current position diff --git a/.changeset/slimy-bats-pretend.md b/.changeset/slimy-bats-pretend.md deleted file mode 100644 index c2202c3ad..000000000 --- a/.changeset/slimy-bats-pretend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@sw-internal/e2e-js': patch ---- - -call fabric e2e test, relayApp, ignore totalAudioEnergy if undefined diff --git a/.changeset/sour-jars-mix.md b/.changeset/sour-jars-mix.md deleted file mode 100644 index 193388faf..000000000 --- a/.changeset/sour-jars-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@sw-internal/e2e-js': patch ---- - -Review and add e2e tests for v2 webrtc diff --git a/.changeset/three-mails-think.md b/.changeset/three-mails-think.md deleted file mode 100644 index 034124130..000000000 --- a/.changeset/three-mails-think.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -New interface for the Messaging API - -The new interface contains a single SW client with Messaging namespace -```javascript - 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) - } -``` diff --git a/.changeset/tidy-bananas-own.md b/.changeset/tidy-bananas-own.md deleted file mode 100644 index 0f9204ce9..000000000 --- a/.changeset/tidy-bananas-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@sw-internal/e2e-js': patch ---- - -Refine v2 e2e tests, RTCStats usage diff --git a/.changeset/tidy-beers-pay.md b/.changeset/tidy-beers-pay.md deleted file mode 100644 index 7688cd8e1..000000000 --- a/.changeset/tidy-beers-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@sw-internal/e2e-js': patch ---- - -Fix last remaining checks for totalAudioEnergy diff --git a/.changeset/tiny-dancers-rescue.md b/.changeset/tiny-dancers-rescue.md deleted file mode 100644 index 6924a7a32..000000000 --- a/.changeset/tiny-dancers-rescue.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -'@signalwire/webrtc': minor -'@signalwire/js': minor ---- - -Allow users to pass the optional `disableUdpIceServers` boolean flag with a value of `true` to remove the URLs of UDP transport ICE servers. - -Default value for `disableUdpIceServers` is `false` - -Call Fabric SDK: - -```js -import { SignalWire } from '@signalwire/js' - -const client = await SignalWire({ - host: ..., - token: ..., - rootElement: ..., - disableUdpIceServers: true|false, // default is false -}) -``` - -Video SDK: - -```js -import { Video } from '@signalwire/js' - -const roomSession = new Video.RoomSession({ - host: ..., - token: ..., - rootElement: ..., - disableUdpIceServers: true|false, // default is false -}) -``` diff --git a/.changeset/tricky-ants-talk.md b/.changeset/tricky-ants-talk.md deleted file mode 100644 index 4e4d31fe1..000000000 --- a/.changeset/tricky-ants-talk.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -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** -```js -const play = call.playAudio({ url: '...' }) -await play.id -``` - -Playback example 2 - **Resolving promise when playback starts** -```js -const play = await call.playAudio({ url: '...' }).onStarted() -play.id -``` - -Playback example 3 - **Resolving promise when playback ends** -```js -const play = await call.playAudio({ url: '...' }).onEnded() -play.id -``` - -Playback example 4 - **Resolving promise when playback ends - Default behavior** -```js -const play = await call.playAudio({ url: '...' }) -play.id -``` - -All the other APIs work in a similar way. diff --git a/.changeset/violet-boats-count.md b/.changeset/violet-boats-count.md deleted file mode 100644 index b2b8c8947..000000000 --- a/.changeset/violet-boats-count.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@signalwire/realtime-api': major -'@signalwire/core': major ---- - -Task namespace with new interface diff --git a/.changeset/yellow-files-deny.md b/.changeset/yellow-files-deny.md deleted file mode 100644 index b357999d9..000000000 --- a/.changeset/yellow-files-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/realtime-api': patch ---- - -Bug fix for playback/recording/stream listeners diff --git a/.changeset/young-experts-tan.md b/.changeset/young-experts-tan.md deleted file mode 100644 index a2a8eab2e..000000000 --- a/.changeset/young-experts-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@signalwire/js': patch ---- - -FIXED HTTPClient should use the ch header from the JWT token for the host domain diff --git a/internal/e2e-js/CHANGELOG.md b/internal/e2e-js/CHANGELOG.md index ae022147d..15bc9d741 100644 --- a/internal/e2e-js/CHANGELOG.md +++ b/internal/e2e-js/CHANGELOG.md @@ -1,5 +1,17 @@ # @sw-internal/e2e-js +## 0.0.17 + +### Patch Changes + +- [#985](https://github.com/signalwire/signalwire-js/pull/985) [`82f8461a`](https://github.com/signalwire/signalwire-js/commit/82f8461a8785932dbd5ce89a52be6f6d4bd1ea4e) Thanks [@giavac](https://github.com/giavac)! - call fabric e2e test, relayApp, ignore totalAudioEnergy if undefined + +- [#980](https://github.com/signalwire/signalwire-js/pull/980) [`2f8549eb`](https://github.com/signalwire/signalwire-js/commit/2f8549eb1df2e612fb55e4af0e0c1aad3e783ee8) Thanks [@giavac](https://github.com/giavac)! - Review and add e2e tests for v2 webrtc + +- [#981](https://github.com/signalwire/signalwire-js/pull/981) [`533c0311`](https://github.com/signalwire/signalwire-js/commit/533c0311369ea5a22263b23657e0a9c013b38bc5) Thanks [@giavac](https://github.com/giavac)! - Refine v2 e2e tests, RTCStats usage + +- [#998](https://github.com/signalwire/signalwire-js/pull/998) [`5dd95132`](https://github.com/signalwire/signalwire-js/commit/5dd95132e02db8457946ddbeecdff4961277a6fe) Thanks [@giavac](https://github.com/giavac)! - Fix last remaining checks for totalAudioEnergy + ## 0.0.16 ### Patch Changes diff --git a/internal/e2e-js/package.json b/internal/e2e-js/package.json index 69399d5ff..62369e46f 100644 --- a/internal/e2e-js/package.json +++ b/internal/e2e-js/package.json @@ -1,6 +1,6 @@ { "name": "@sw-internal/e2e-js", - "version": "0.0.16", + "version": "0.0.17", "private": true, "main": "index.js", "scripts": { diff --git a/internal/e2e-realtime-api/CHANGELOG.md b/internal/e2e-realtime-api/CHANGELOG.md index 26592108d..7e0826eca 100644 --- a/internal/e2e-realtime-api/CHANGELOG.md +++ b/internal/e2e-realtime-api/CHANGELOG.md @@ -1,5 +1,11 @@ # @sw-internal/e2e-realtime-api +## 0.1.14 + +### Patch Changes + +- [#954](https://github.com/signalwire/signalwire-js/pull/954) [`c401cba0`](https://github.com/signalwire/signalwire-js/commit/c401cba058f261696d8fb6f90deb523def9f4094) Thanks [@giavac](https://github.com/giavac)! - Fix collect e2e tests + ## 0.1.13 ### Patch Changes diff --git a/internal/e2e-realtime-api/package.json b/internal/e2e-realtime-api/package.json index 4e01b2ea9..e1175ae48 100644 --- a/internal/e2e-realtime-api/package.json +++ b/internal/e2e-realtime-api/package.json @@ -1,6 +1,6 @@ { "name": "@sw-internal/e2e-realtime-api", - "version": "0.1.13", + "version": "0.1.14", "private": true, "main": "index.js", "scripts": { diff --git a/package-lock.json b/package-lock.json index 012a8a266..bc53bda9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ }, "internal/e2e-js": { "name": "@sw-internal/e2e-js", - "version": "0.0.16", + "version": "0.0.17", "dependencies": { "@sw-internal/playground-js": "0.0.15", "node-fetch": "^2.6.7", @@ -151,7 +151,7 @@ }, "internal/e2e-realtime-api": { "name": "@sw-internal/e2e-realtime-api", - "version": "0.1.13", + "version": "0.1.14", "dependencies": { "@mapbox/node-pre-gyp": "^1.0.10", "tap": "^18.7.2", @@ -18237,7 +18237,7 @@ }, "packages/core": { "name": "@signalwire/core", - "version": "4.0.0-beta.0", + "version": "4.0.0", "license": "MIT", "dependencies": { "@redux-saga/core": "^1.2.3", @@ -18270,11 +18270,11 @@ }, "packages/js": { "name": "@signalwire/js", - "version": "3.25.1", + "version": "3.26.0", "license": "MIT", "dependencies": { - "@signalwire/core": "4.0.0-beta.0", - "@signalwire/webrtc": "3.11.0", + "@signalwire/core": "4.0.0", + "@signalwire/webrtc": "3.12.0", "jwt-decode": "^3.1.2" }, "engines": { @@ -18295,10 +18295,10 @@ }, "packages/realtime-api": { "name": "@signalwire/realtime-api", - "version": "4.0.0-beta.0", + "version": "4.0.0", "license": "MIT", "dependencies": { - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "ws": "^8.13.0" }, "devDependencies": { @@ -18327,11 +18327,11 @@ }, "packages/web-api": { "name": "@signalwire/web-api", - "version": "3.1.0", + "version": "3.1.1", "license": "MIT", "dependencies": { "@signalwire/compatibility-api": "^3.1.3", - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "node-abort-controller": "^2.0.0", "node-fetch": "^2.6.1" }, @@ -18345,10 +18345,10 @@ }, "packages/webrtc": { "name": "@signalwire/webrtc", - "version": "3.11.0", + "version": "3.12.0", "license": "MIT", "dependencies": { - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "sdp": "^3.2.0" }, "engines": { diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 0787ccbbc..39e918ecc 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -4,6 +4,313 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.0.0] - 2024-04-17 + +### Added + +- [#881](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for Voice APIs + + The new interface contains a single SW client with Chat and PubSub namespaces + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/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`, and `room.startStream` functions. + - Decorated promise for `room.play`, `room.startRecording`, and `room.startStream` functions. + + ```js + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for PubSub and Chat APIs + + The new interface contains a single SW client with Chat and PubSub namespaces + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for the Messaging API + + The new interface contains a single SW client with Messaging namespace + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/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** + + ```js + const play = call.playAudio({ url: '...' }) + await play.id + ``` + + Playback example 2 - **Resolving promise when playback starts** + + ```js + const play = await call.playAudio({ url: '...' }).onStarted() + play.id + ``` + + Playback example 3 - **Resolving promise when playback ends** + + ```js + const play = await call.playAudio({ url: '...' }).onEnded() + play.id + ``` + + Playback example 4 - **Resolving promise when playback ends - Default behavior** + + ```js + const play = await call.playAudio({ url: '...' }) + play.id + ``` + + All the other APIs work in a similar way. + +- [#881](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Task namespace with new interface + +### Changed + +- [#921](https://github.com/signalwire/signalwire-js/pull/921) [`03f01c36`](https://github.com/signalwire/signalwire-js/commit/03f01c36b3f1244e4eed4188610e67955c7ba9ce) Thanks [@jpsantosbh](https://github.com/jpsantosbh)! - support for eventing acknowledge + +- [#948](https://github.com/signalwire/signalwire-js/pull/948) [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Allow user to pass filters to `getAddress` function + + ```js + const addressData = await client.getAddresses({ + type: 'room', + displayName: 'domain app', + }) + ``` + ## [3.21.0] - 2023-11-23 ### Added diff --git a/packages/core/package.json b/packages/core/package.json index ffee8cb76..8a12b742b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,10 +3,9 @@ "description": "Shared code for the SignalWire JS SDK", "author": "SignalWire Team ", "license": "MIT", - "version": "4.0.0-beta.0", + "version": "4.0.0", "main": "dist/index.node.js", "module": "dist/index.esm.js", - "beta": true, "files": [ "dist", "src" diff --git a/packages/js/CHANGELOG.md b/packages/js/CHANGELOG.md index 0219b4444..9cc356295 100644 --- a/packages/js/CHANGELOG.md +++ b/packages/js/CHANGELOG.md @@ -4,6 +4,57 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.26.0] - 2024-04-17 + +### Added + +- [#932](https://github.com/signalwire/signalwire-js/pull/932) [`6b0f8227`](https://github.com/signalwire/signalwire-js/commit/6b0f82271c0029c6f136a20e5b9326bdd9abab48) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Allow users to pass the optional `disableUdpIceServers` boolean flag with a value of `true` to remove the URLs of UDP transport ICE servers. + + Default value for `disableUdpIceServers` is `false` + + Call Fabric SDK: + + ```js + import { SignalWire } from '@signalwire/js' + + const client = await SignalWire({ + host: ..., + token: ..., + rootElement: ..., + disableUdpIceServers: true|false, // default is false + }) + ``` + + Video SDK: + + ```js + import { Video } from '@signalwire/js' + + const roomSession = new Video.RoomSession({ + host: ..., + token: ..., + rootElement: ..., + disableUdpIceServers: true|false, // default is false + }) + ``` + +### Changed + +- [#948](https://github.com/signalwire/signalwire-js/pull/948) [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Allow user to pass filters to `getAddress` function + + ```js + const addressData = await client.getAddresses({ + type: 'room', + displayName: 'domain app', + }) + ``` + +- [#961](https://github.com/signalwire/signalwire-js/pull/961) [`b6e30de2`](https://github.com/signalwire/signalwire-js/commit/b6e30de2f1bdae486304b294768e0bfe1d091f17) Thanks [@jpsantosbh](https://github.com/jpsantosbh)! - FIXED HTTPClient should use the ch header from the JWT token for the host domain + +- Updated dependencies [[`03f01c36`](https://github.com/signalwire/signalwire-js/commit/03f01c36b3f1244e4eed4188610e67955c7ba9ce), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`d93c3af4`](https://github.com/signalwire/signalwire-js/commit/d93c3af430db1580de204d8da9906a2220951049), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`6b0f8227`](https://github.com/signalwire/signalwire-js/commit/6b0f82271c0029c6f136a20e5b9326bdd9abab48), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99)]: + - @signalwire/core@4.0.0 + - @signalwire/webrtc@3.12.0 + ## [3.25.1] - 2023-12-05 ### Added diff --git a/packages/js/package.json b/packages/js/package.json index 112ee394e..2c6eac425 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -3,7 +3,7 @@ "description": "SignalWire JS SDK", "author": "SignalWire Team ", "license": "MIT", - "version": "3.25.1", + "version": "3.26.0", "main": "dist/index.js", "module": "dist/index.esm.js", "unpkg": "dist/index.umd.js", @@ -39,8 +39,8 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@signalwire/core": "4.0.0-beta.0", - "@signalwire/webrtc": "3.11.0", + "@signalwire/core": "4.0.0", + "@signalwire/webrtc": "3.12.0", "jwt-decode": "^3.1.2" }, "types": "dist/js/src/index.d.ts" diff --git a/packages/realtime-api/CHANGELOG.md b/packages/realtime-api/CHANGELOG.md index 1b25f5417..da8e26765 100644 --- a/packages/realtime-api/CHANGELOG.md +++ b/packages/realtime-api/CHANGELOG.md @@ -4,6 +4,315 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.0.0] - 2024-04-17 + +### Added + +- [#881](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for Voice APIs + + The new interface contains a single SW client with Chat and PubSub namespaces + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/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`, and `room.startStream` functions. + - Decorated promise for `room.play`, `room.startRecording`, and `room.startStream` functions. + + ```js + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for PubSub and Chat APIs + + The new interface contains a single SW client with Chat and PubSub namespaces + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - New interface for the Messaging API + + The new interface contains a single SW client with Messaging namespace + + ```javascript + 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](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/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** + + ```js + const play = call.playAudio({ url: '...' }) + await play.id + ``` + + Playback example 2 - **Resolving promise when playback starts** + + ```js + const play = await call.playAudio({ url: '...' }).onStarted() + play.id + ``` + + Playback example 3 - **Resolving promise when playback ends** + + ```js + const play = await call.playAudio({ url: '...' }).onEnded() + play.id + ``` + + Playback example 4 - **Resolving promise when playback ends - Default behavior** + + ```js + const play = await call.playAudio({ url: '...' }) + play.id + ``` + + All the other APIs work in a similar way. + +- [#881](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Task namespace with new interface + +### Fixed + +- [#954](https://github.com/signalwire/signalwire-js/pull/954) [`c401cba0`](https://github.com/signalwire/signalwire-js/commit/c401cba058f261696d8fb6f90deb523def9f4094) Thanks [@giavac](https://github.com/giavac)! - Fix collect e2e tests + +- [#881](https://github.com/signalwire/signalwire-js/pull/881) [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Fix `onStarted` function in decorated promises + +- [#945](https://github.com/signalwire/signalwire-js/pull/945) [`300f242e`](https://github.com/signalwire/signalwire-js/commit/300f242e3ee1f08595addd06b49d3eb62bd18b89) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Fix tap.started event on Tap instance + +- [#943](https://github.com/signalwire/signalwire-js/pull/943) [`8335cdf3`](https://github.com/signalwire/signalwire-js/commit/8335cdf387e088c00926c0d05f624f944e85d574) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Add missing getter for member current position + +- [#942](https://github.com/signalwire/signalwire-js/pull/942) [`cdb4b202`](https://github.com/signalwire/signalwire-js/commit/cdb4b202f612c34b35325da7c7652f6c3204b0fd) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Bug fix for playback/recording/stream listeners + +- Updated dependencies [[`03f01c36`](https://github.com/signalwire/signalwire-js/commit/03f01c36b3f1244e4eed4188610e67955c7ba9ce), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99)]: + - @signalwire/core@4.0.0 + ## [3.13.0] - 2023-11-23 ### Added diff --git a/packages/realtime-api/package.json b/packages/realtime-api/package.json index 86d9d95a4..32c44f93a 100644 --- a/packages/realtime-api/package.json +++ b/packages/realtime-api/package.json @@ -3,9 +3,8 @@ "description": "SignalWire RealTime SDK for Node.js", "author": "SignalWire Team ", "license": "MIT", - "version": "4.0.0-beta.0", + "version": "4.0.0", "main": "dist/index.node.js", - "beta": true, "exports": { "require": "./dist/index.node.js", "default": "./dist/index.node.mjs" @@ -38,7 +37,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "ws": "^8.13.0" }, "devDependencies": { diff --git a/packages/web-api/CHANGELOG.md b/packages/web-api/CHANGELOG.md index c42c017c7..bf85c2fbc 100644 --- a/packages/web-api/CHANGELOG.md +++ b/packages/web-api/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.1] - 2024-04-17 + +### Dependencies + +- Updated dependencies [[`03f01c36`](https://github.com/signalwire/signalwire-js/commit/03f01c36b3f1244e4eed4188610e67955c7ba9ce), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99)]: + - @signalwire/core@4.0.0 + ## [3.1.0] - 2023-11-23 ### Added diff --git a/packages/web-api/package.json b/packages/web-api/package.json index a6f023763..bfb130b55 100644 --- a/packages/web-api/package.json +++ b/packages/web-api/package.json @@ -3,7 +3,7 @@ "description": "SignalWire Web-API SDK for Node.js", "author": "SignalWire Team ", "license": "MIT", - "version": "3.1.0", + "version": "3.1.1", "main": "dist/index.node.js", "exports": { "require": "./dist/index.node.js", @@ -38,7 +38,7 @@ }, "dependencies": { "@signalwire/compatibility-api": "^3.1.3", - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "node-abort-controller": "^2.0.0", "node-fetch": "^2.6.1" }, diff --git a/packages/webrtc/CHANGELOG.md b/packages/webrtc/CHANGELOG.md index 4cb1cfc85..ec4dd7eed 100644 --- a/packages/webrtc/CHANGELOG.md +++ b/packages/webrtc/CHANGELOG.md @@ -4,6 +4,47 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.12.0] - 2024-04-17 + +### Added + +- [#932](https://github.com/signalwire/signalwire-js/pull/932) [`6b0f8227`](https://github.com/signalwire/signalwire-js/commit/6b0f82271c0029c6f136a20e5b9326bdd9abab48) Thanks [@iAmmar7](https://github.com/iAmmar7)! - Allow users to pass the optional `disableUdpIceServers` boolean flag with a value of `true` to remove the URLs of UDP transport ICE servers. + + Default value for `disableUdpIceServers` is `false` + + Call Fabric SDK: + + ```js + import { SignalWire } from '@signalwire/js' + + const client = await SignalWire({ + host: ..., + token: ..., + rootElement: ..., + disableUdpIceServers: true|false, // default is false + }) + ``` + + Video SDK: + + ```js + import { Video } from '@signalwire/js' + + const roomSession = new Video.RoomSession({ + host: ..., + token: ..., + rootElement: ..., + disableUdpIceServers: true|false, // default is false + }) + ``` + +### Fixed + +- [#959](https://github.com/signalwire/signalwire-js/pull/959) [`d93c3af4`](https://github.com/signalwire/signalwire-js/commit/d93c3af430db1580de204d8da9906a2220951049) Thanks [@jpsantosbh](https://github.com/jpsantosbh)! - FIXED include a media track in a sdp answer only when the peer offer have the same media + +- Updated dependencies [[`03f01c36`](https://github.com/signalwire/signalwire-js/commit/03f01c36b3f1244e4eed4188610e67955c7ba9ce), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`6cb639bf`](https://github.com/signalwire/signalwire-js/commit/6cb639bf6dcbacefd71615ec99c4911cbbd120c4), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99), [`b39b82fe`](https://github.com/signalwire/signalwire-js/commit/b39b82feed94950ef21883ba9dfe8c8f25220b99)]: + - @signalwire/core@4.0.0 + ## [3.11.0] - 2023-11-23 ### Added diff --git a/packages/webrtc/package.json b/packages/webrtc/package.json index b9abeffac..f67213f80 100644 --- a/packages/webrtc/package.json +++ b/packages/webrtc/package.json @@ -3,7 +3,7 @@ "description": "SignalWire WebRTC library", "author": "SignalWire Team ", "license": "MIT", - "version": "3.11.0", + "version": "3.12.0", "main": "dist/cjs/webrtc/src/index.js", "module": "dist/mjs/webrtc/src/index.js", "files": [ @@ -37,7 +37,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@signalwire/core": "4.0.0-beta.0", + "@signalwire/core": "4.0.0", "sdp": "^3.2.0" }, "types": "dist/cjs/webrtc/src/index.d.ts"