-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6cf6a8
commit 442fad7
Showing
690 changed files
with
22,705 additions
and
1 deletion.
There are no files selected for viewing
149 changes: 149 additions & 0 deletions
149
android/src/main/java/com/twiliovoicereactnative/CommonConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
package com.twiliovoicereactnative; | ||
|
||
public class CommonConstants { | ||
// React Native Voice SDK | ||
public static final String ReactNativeVoiceSDK = "react-native"; | ||
|
||
// Scope names | ||
public static final String ScopeVoice = "scopeVoice"; | ||
public static final String ScopeCall = "scopeCall"; | ||
|
||
// Voice events | ||
// Common | ||
public static final String VoiceEventError = "voiceEventError"; | ||
public static final String VoiceEventType = "type"; | ||
|
||
// Error | ||
public static final String VoiceErrorKeyError = "error"; | ||
public static final String VoiceErrorKeyCode = "code"; | ||
public static final String VoiceErrorKeyMessage = "message"; | ||
|
||
// Registration | ||
public static final String VoiceEventRegistered = "voiceEventRegistered"; | ||
public static final String VoiceEventUnregistered = "voiceEventUnregistered"; | ||
|
||
// Call Info | ||
public static final String CallInfoUuid = "uuid"; | ||
public static final String CallInfoSid = "sid"; | ||
public static final String CallInfoFrom = "from"; | ||
public static final String CallInfoTo = "to"; | ||
public static final String CallInfoIsMuted = "isMuted"; | ||
public static final String CallInfoIsOnHold = "isOnHold"; | ||
|
||
// Call Invite Info | ||
public static final String CallInviteInfoUuid = "uuid"; | ||
public static final String CallInviteInfoCallSid = "callSid"; | ||
public static final String CallInviteInfoFrom = "from"; | ||
public static final String CallInviteInfoTo = "to"; | ||
public static final String CallInviteInfoCustomParameters = "customParameters"; | ||
|
||
// Cancelled Call Invite Info | ||
public static final String CancelledCallInviteInfoUuid = "uuid"; | ||
public static final String CancelledCallInviteInfoCallSid = "callSid"; | ||
public static final String CancelledCallInviteInfoFrom = "from"; | ||
public static final String CancelledCallInviteInfoTo = "to"; | ||
public static final String CancelledCallInviteInfoCustomParameters = "customParameters"; | ||
|
||
// Call Invite | ||
public static final String VoiceEventCallInvite = "voiceEventCallInvite"; | ||
public static final String VoiceEventCallInviteAccepted = "voiceEventCallInviteAccepted"; | ||
public static final String VoiceEventCallInviteRejected = "voiceEventCallInviteRejected"; | ||
public static final String VoiceEventCallInviteCancelled = "voiceEventCallInviteCancelled"; | ||
|
||
// Audio Devices Updated Event | ||
public static final String VoiceEventAudioDevicesUpdated = "voiceEventAudioDevicesUpdated"; | ||
|
||
// Audio Device | ||
public static final String AudioDeviceKeyUuid = "uuid"; | ||
public static final String AudioDeviceKeyName = "name"; | ||
public static final String AudioDeviceKeyType = "type"; | ||
public static final String AudioDeviceKeyAudioDevices = "audioDevices"; | ||
public static final String AudioDeviceKeySelectedDevice = "selectedDevice"; | ||
|
||
// Call events | ||
// State | ||
public static final String CallEventConnected = "callEventConnected"; | ||
public static final String CallEventConnectFailure = "callEventConnectFailure"; | ||
public static final String CallEventDisconnected = "callEventDisconnected"; | ||
public static final String CallEventReconnecting = "callEventReconnecting"; | ||
public static final String CallEventReconnected = "callEventReconnected"; | ||
public static final String CallEventRinging = "callEventRinging"; | ||
|
||
// Quality warnings | ||
public static final String CallEventQualityWarningsChanged = "callEventQualityWarningsChanged"; | ||
public static final String CallEventCurrentWarnings = "callEventCurrentWarnings"; | ||
public static final String CallEventPreviousWarnings = "callEventPreviousWarnings"; | ||
|
||
// Post feedback | ||
public static final String Score = "score"; | ||
public static final String Issue = "issue"; | ||
|
||
// StatsReport | ||
public static final String PeerConnectionId = "peerConnectionId"; | ||
public static final String LocalAudioTrackStats = "localAudioTrackStats"; | ||
public static final String RemoteAudioTrackStats = "remoteAudioTrackStats"; | ||
public static final String IceCandidatePairStats = "iceCandidatePairStats"; | ||
public static final String IceCandidateStats = "iceCandidateStats"; | ||
public static final String Codec = "codec"; | ||
public static final String PacketsLost = "packetsLost"; | ||
public static final String Ssrc = "ssrc"; | ||
public static final String TrackId = "trackId"; | ||
public static final String Timestamp = "timestamp"; | ||
public static final String BytesSent = "bytesSent"; | ||
public static final String PacketsSent = "packetsSent"; | ||
public static final String RoundTripTime = "roundTripTime"; | ||
public static final String AudioLevel = "audioLevel"; | ||
public static final String Jitter = "jitter"; | ||
public static final String BytesReceived = "bytesReceived"; | ||
public static final String Mos = "mos"; | ||
public static final String TransportId = "transportId"; | ||
public static final String LocalCandidateId = "localCandidateId"; | ||
public static final String RemoteCandidateId = "remoteCandidateId"; | ||
public static final String State = "state"; | ||
public static final String LocalCandidateIp = "localCandidateIp"; | ||
public static final String RemoteCandidateIp = "remoteCandidateIp"; | ||
public static final String Nominated = "nominated"; | ||
public static final String Writeable = "writeable"; | ||
public static final String Readable = "readable"; | ||
public static final String TotalRoundTripTime = "totalRoundTripTime"; | ||
public static final String CurrentRoundTripTime = "currentRoundTripTime"; | ||
public static final String AvailableOutgoingBitrate = "availableOutgoingBitrate"; | ||
public static final String AvailableIncomingBitrate = "availableIncomingBitrate"; | ||
public static final String RequestsReceived = "requestsReceived"; | ||
public static final String RequestsSent = "requestsSent"; | ||
public static final String ResponsesReceived = "responsesReceived"; | ||
public static final String ResponsesSent = "responsesSent"; | ||
public static final String RetransmissionsReceived = "retransmissionsReceived"; | ||
public static final String RetransmissionsSent = "retransmissionsSent"; | ||
public static final String ConsentRequestsReceived = "consentRequestsReceived"; | ||
public static final String ConsentRequestsSent = "consentRequestsSent"; | ||
public static final String ConsentResponsesReceived = "consentResponsesReceived"; | ||
public static final String ConsentResponsesSent = "consentResponsesSent"; | ||
public static final String ActiveCandidatePair = "activeCandidatePair"; | ||
public static final String RelayProtocol = "relayProtocol"; | ||
public static final String IsRemote = "isRemote"; | ||
public static final String Ip = "ip"; | ||
public static final String Port = "port"; | ||
public static final String Protocol = "protocol"; | ||
public static final String CandidateType = "candidateType"; | ||
public static final String Priority = "priority"; | ||
public static final String Url = "url"; | ||
public static final String Deleted = "deleted"; | ||
public static final String PacketsReceived = "packetsReceived"; | ||
|
||
// IceCandidatePairState | ||
public static final String StateFailed = "stateFailed"; | ||
public static final String StateFrozen = "stateFrozen"; | ||
public static final String StateInProgress = "stateInProgress"; | ||
public static final String StateSucceeded = "stateSucceeded"; | ||
public static final String StateWaiting = "stateWaiting"; | ||
public static final String StateUnknown = "stateUnknown"; | ||
|
||
// iOS CallKit configuration | ||
public static final String CallKitMaximumCallsPerCallGroup = "callKitMaximumCallsPerCallGroup"; | ||
public static final String CallKitMaximumCallGroups = "callKitMaximumCallGroups"; | ||
public static final String CallKitIncludesCallsInRecents = "callKitIncludesCallsInRecents"; | ||
public static final String CallKitSupportedHandleTypes = "callKitSupportedHandleTypes"; | ||
public static final String CallKitIconTemplateImageData = "callKitIconTemplateImageData"; | ||
public static final String CallKitRingtoneSound = "callKitRingtoneSound"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) | ||
|
||
## API Reference | ||
|
||
## Packages | ||
|
||
| Package | Description | | ||
| --- | --- | | ||
| [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) | Provides access to Twilio Programmable Voice for React Native applications running on iOS and Android devices. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_class.md) | ||
|
||
## AudioDevice class | ||
|
||
Describes audio devices as reported by the native layer and allows the native selection of the described audio device. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class AudioDevice | ||
``` | ||
|
||
## Remarks | ||
|
||
To fetch a list of available audio devices and the currently selected audio device, see [Voice.getAudioDevices()](./voice-react-native-sdk.voice_class.getaudiodevices_method.md)<!-- -->. | ||
|
||
- See also the [AudioDevice namespace](./voice-react-native-sdk.audiodevice_namespace.md) for types used by this class. | ||
|
||
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `AudioDevice` class. | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [name](./voice-react-native-sdk.audiodevice_class.name_property.md) | | string | The name of the audio device. | | ||
| [type](./voice-react-native-sdk.audiodevice_class.type_property.md) | | [AudioDevice.Type](./voice-react-native-sdk.audiodevice_namespace.type_enum.md) | The type of the audio device. | | ||
|
||
## Methods | ||
|
||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [select()](./voice-react-native-sdk.audiodevice_class.select_method.md) | | Calling this method will select this audio device as the active audio device. | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/voice-react-native-sdk.audiodevice_class.name_property.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_class.md) > [name](./voice-react-native-sdk.audiodevice_class.name_property.md) | ||
|
||
## AudioDevice.name property | ||
|
||
The name of the audio device. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
name: string; | ||
``` |
19 changes: 19 additions & 0 deletions
19
docs/voice-react-native-sdk.audiodevice_class.select_method.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_class.md) > [select](./voice-react-native-sdk.audiodevice_class.select_method.md) | ||
|
||
## AudioDevice.select() method | ||
|
||
Calling this method will select this audio device as the active audio device. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
select(): Promise<void>; | ||
``` | ||
<b>Returns:</b> | ||
|
||
Promise<void> | ||
|
||
A `Promise` that - Resolves with `void` when the audio device has been successfully selected as the active audio device. - Rejects if the audio device cannot be selected. | ||
|
13 changes: 13 additions & 0 deletions
13
docs/voice-react-native-sdk.audiodevice_class.type_property.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_class.md) > [type](./voice-react-native-sdk.audiodevice_class.type_property.md) | ||
|
||
## AudioDevice.type property | ||
|
||
The type of the audio device. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type: AudioDevice.Type; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_namespace.md) | ||
|
||
## AudioDevice namespace | ||
|
||
Contains interfaces and enumerations associated with audio devices. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare namespace AudioDevice | ||
``` | ||
## Remarks | ||
- See also the [AudioDevice class](./voice-react-native-sdk.audiodevice_class.md)<!-- -->. | ||
## Enumerations | ||
| Enumeration | Description | | ||
| --- | --- | | ||
| [Type](./voice-react-native-sdk.audiodevice_namespace.type_enum.md) | Audio device type enumeration. Describes all possible audio device types as reportable by the native layer. | | ||
22 changes: 22 additions & 0 deletions
22
docs/voice-react-native-sdk.audiodevice_namespace.type_enum.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [AudioDevice](./voice-react-native-sdk.audiodevice_namespace.md) > [Type](./voice-react-native-sdk.audiodevice_namespace.type_enum.md) | ||
|
||
## AudioDevice.Type enum | ||
|
||
Audio device type enumeration. Describes all possible audio device types as reportable by the native layer. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
enum Type | ||
``` | ||
|
||
## Enumeration Members | ||
|
||
| Member | Value | Description | | ||
| --- | --- | --- | | ||
| Bluetooth | <code>"bluetooth"</code> | | | ||
| Earpiece | <code>"earpiece"</code> | | | ||
| Speaker | <code>"speaker"</code> | | | ||
|
19 changes: 19 additions & 0 deletions
19
docs/voice-react-native-sdk.call_class.disconnect_method.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [Call](./voice-react-native-sdk.call_class.md) > [disconnect](./voice-react-native-sdk.call_class.disconnect_method.md) | ||
|
||
## Call.disconnect() method | ||
|
||
Disconnect this side of the call. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
disconnect(): Promise<void>; | ||
``` | ||
<b>Returns:</b> | ||
|
||
Promise<void> | ||
|
||
A `Promise` that - Resolves when the call has disconnected. - Rejects if the native layer cannot disconnect the call. | ||
|
19 changes: 19 additions & 0 deletions
19
docs/voice-react-native-sdk.call_class.getcustomparameters_method.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [Call](./voice-react-native-sdk.call_class.md) > [getCustomParameters](./voice-react-native-sdk.call_class.getcustomparameters_method.md) | ||
|
||
## Call.getCustomParameters() method | ||
|
||
Return a `Record` of custom parameters given to this call. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getCustomParameters(): CustomParameters; | ||
``` | ||
<b>Returns:</b> | ||
|
||
[CustomParameters](./voice-react-native-sdk.customparameters_typealias.md) | ||
|
||
- A `Record` of custom parameters. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [Call](./voice-react-native-sdk.call_class.md) > [getFrom](./voice-react-native-sdk.call_class.getfrom_method.md) | ||
|
||
## Call.getFrom() method | ||
|
||
Get the value of the `from` parameter given to this call. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getFrom(): string | undefined; | ||
``` | ||
<b>Returns:</b> | ||
|
||
string \| undefined | ||
|
||
- A `String` representing the `from` parameter. - `undefined` if the call information has not yet been received from the native layer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [Call](./voice-react-native-sdk.call_class.md) > [getSid](./voice-react-native-sdk.call_class.getsid_method.md) | ||
|
||
## Call.getSid() method | ||
|
||
Get the call `SID`<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getSid(): string | undefined; | ||
``` | ||
<b>Returns:</b> | ||
|
||
string \| undefined | ||
|
||
- A `String` representing the `SID` of the call. - `undefined` if the call information has not yet been received from the native layer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@twilio/voice-react-native-sdk](./voice-react-native-sdk.md) > [Call](./voice-react-native-sdk.call_class.md) > [getState](./voice-react-native-sdk.call_class.getstate_method.md) | ||
|
||
## Call.getState() method | ||
|
||
Get the state of the call object, such as [Call.State.Connected](./voice-react-native-sdk.call_namespace.state_enum.md) or [Call.State.Disconnected](./voice-react-native-sdk.call_namespace.state_enum.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getState(): Call.State; | ||
``` | ||
<b>Returns:</b> | ||
|
||
[Call.State](./voice-react-native-sdk.call_namespace.state_enum.md) | ||
|
||
- A [Call.State](./voice-react-native-sdk.call_namespace.state_enum.md)<!-- -->. | ||
|
Oops, something went wrong.