voip-callkit
v1.0.1
Published
capacitor plugin for callkit and voip
Downloads
5
Readme
voip-callkit
capacitor plugin for callkit and voip
Install
npm install voip-callkit
npx cap sync
API
register(...)
incomingCall(...)
addListener('registration', ...)
addListener('callAnswered', ...)
addListener('callStarted', ...)
- Interfaces
- Type Aliases
register(...)
register(options: { topic: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { topic: string; } |
incomingCall(...)
incomingCall(options: { from: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------ |
| options
| { from: string; } |
addListener('registration', ...)
addListener(eventName: 'registration', listenerFunc: (token: Token) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------- |
| eventName
| 'registration' |
| listenerFunc
| (token: Token) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('callAnswered', ...)
addListener(eventName: 'callAnswered', listenerFunc: (callDate: CallData) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | -------------------------------------------------------------------- |
| eventName
| 'callAnswered' |
| listenerFunc
| (callDate: CallData) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('callStarted', ...)
addListener(eventName: 'callStarted', listenerFunc: (callDate: CallData) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | -------------------------------------------------------------------- |
| eventName
| 'callStarted' |
| listenerFunc
| (callDate: CallData) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
Token
| Prop | Type |
| ----------- | ------------------- |
| token
| string |
CallData
| Prop | Type |
| ------------------ | ------------------- |
| connectionId
| string |
| username
| string |
MessageCallData
| Prop | Type |
| ---------------- | ---------------------- |
| type
| 'message' |
| callbackId
| string |
| pluginId
| string |
| methodName
| string |
| options
| any |
ErrorCallData
| Prop | Type |
| ----------- | ---------------------------------------------------------------------------------------------- |
| type
| 'js.error' |
| error
| { message: string; url: string; line: number; col: number; errorObject: string; } |
Type Aliases
CallData
MessageCallData | ErrorCallData