1.1.0
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()
andvoice.connect()
will now reject the returned Promise with error31401
.When accepting an incoming call through the native notification, the analogous
31401
error can be caught by attaching a listener tovoice.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
ormessageType
.
Changes
Call Message Events (Beta)
-
(Breaking) Removed
CallMessage.MessageType
andCallMessage.ContentType
enumerations and types.
Instead, those types have been replaced bystring
. -
(Breaking) Simplified the
Call
andCallInvite
API for sending call messages.Call.sendMessage
andCallInvite.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 code31401
when attempting to make an outgoing call
or when trying to accept an incoming call.