Skip to content

1.1.0

Compare
Choose a tag to compare
@mhuynh5757 mhuynh5757 released this 21 Aug 18:50
· 45 commits to main since this release

1.1.0 (Aug 20, 2024)

Features

Platform Specific Features

Android

  • Added support for Android 34

  • Missing Android microphone permissions will now be gracefully handled.

    When using the JS API, callInvite.accept() and voice.connect() will now reject the returned Promise with error 31401.

    When accepting an incoming call through the native notification, the analogous 31401 error can be caught by attaching a listener to voice.on(Voice.Event.Error, ...). See the following example:

    voice.on(Voice.Event.Error, (error) => {
      // handle error
      if (error.code === 31401) {
        // show the end-user that they did not give the app the proper permissions
      }
    });

Fixes

Platform Specific Fixes

iOS

  • Fixed Call Messages not being built with the passed contentType or messageType.

Changes

Call Message Events (Beta)

  • (Breaking) Removed CallMessage.MessageType and CallMessage.ContentType enumerations and types.
    Instead, those types have been replaced by string.

  • (Breaking) Simplified the Call and CallInvite API for sending call messages. Call.sendMessage and CallInvite.sendMessage now take a plain-JS object, or interface, as a parameter.

The following is an example of the updated API considering the above changes.

For outgoing calls:

const call = await voice.connect(...);
const outgoingCallMessage = await call.sendMessage({
  content: { foo: 'bar' },
  contentType: 'application/json',
  messageType: 'user-defined-message',
});

For call invites:

voice.on(Voice.Event.CallInvite, (callInvite) => {
  const outgoingCallMessage = await callInvite.sendMessage({
    content: { foo: 'bar' },
    contentType: 'application/json',
    messageType: 'user-defined-message',
  });
});
  • Added new error codes. See the following table for details:
    Error Code Description
    31210 Raised when a Call Message is sent with an invalid message type.
    31211 Raised when a Call Message is sent when the call is not yet ready to send messages. This can typically happen when the Call/CallInvite is not yet in a ringing state.

Platform Specific Changes

Android

  • When permissions are not available, the SDK will now raise a new
    PermissionsError with code 31401 when attempting to make an outgoing call
    or when trying to accept an incoming call.