Skip to content

Releases: signalwire/signalwire-js

@signalwire/realtime-api v3.2.0

27 Jun 16:17
80830d7
Compare
Choose a tag to compare

This is a small release that contains a couple of minor fixes and improvements.

Improvements

  • Expose getRoomSessions() and getRoomSessionById() on the VideoClient to retrieve in-progress RoomSessions. (#580) e8a54a6
  • Expose removeAllMembers() on RoomSession (#581) 14c08b8

@signalwire/js v3.12.1

27 Jun 16:18
80830d7
Compare
Choose a tag to compare

This is a maintenance release that contains a couple of minor fixes.

Fixes

  • Fix issue with missing constructors on react-native. (#574) 4e35e0a
  • Add default width/height for video constraints. (#578) 2bd390d
  • Fix a possible condition where the localVideo overlay shows up after a video mute and video unmute in sequence without any layout changes in between. (#579) 3cd2bab

@signalwire/realtime-api v3.0.1

02 Jun 18:07
eb735ca
Compare
Choose a tag to compare

This is a maintenance release that contains a couple of minor fixes and improvements.

Fixes

  • Fix task.received handler on the Task namespace. (#553) 47ed171

Improvements

  • Add layoutName to the RoomSession interface. (#542) 875b2bb

@signalwire/js v3.11.1

02 Jun 18:07
eb735ca
Compare
Choose a tag to compare

This is a maintenance release that contains a couple of minor fixes.

Fixes

  • Try to force a browser repaint to move the local video overlay to the correct position (#541) 4ad0935
  • Fix issue with local streams when the user joins with a token with join_audio_muted or join_video_muted. Update typings. (#554) 1b95b93

@signalwire/realtime-api v3.0.0

20 May 01:20
ad778c3
Compare
Choose a tag to compare

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

  • Fix: expose all the active recordings on the room.joined event (#501) 5c96bf8

Improvements

  • We have introduced the PubSub namespace to keep the minimal PubSub functionality available to users as Chat continues to develop (#533) b6d5bb3

@signalwire/js v3.11.0

20 May 01:20
ad778c3
Compare
Choose a tag to compare

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

  • We have introduced the PubSub namespace to keep the minimal PubSub functionality available to users as Chat continues to develop (#533) b6d5bb3

@signalwire/realtime-api v3.0.0-beta.8

25 Mar 11:26
Compare
Choose a tag to compare

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 and setMemberMeta methods on the RoomSession (#452)

@signalwire/js v3.10.0

25 Mar 11:27
Compare
Choose a tag to compare

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 and setMemberMeta methods on the RoomSession (#452)

Improvements

  • Updated default screenShare audio constraints (#457)

Bug fixes

  • Fixed issue with local video overlay when user is video muted (#455)
  • Fixed Chat methods that required the underlay client to be connected (#469)
  • Fixed getDisplayMedia signature (#463)

@signalwire/realtime-api v3.0.0-beta.7

02 Mar 16:18
edfda1a
Compare
Choose a tag to compare

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

02 Mar 16:17
edfda1a
Compare
Choose a tag to compare

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.