https://github.com/mozhn/capacitor-callkit-voip
https://github.com/mozhn/capacitor-callkit-voip
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mozhn/capacitor-callkit-voip
- Owner: mozhn
- Created: 2023-09-06T07:43:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-06T10:07:36.000Z (over 1 year ago)
- Last Synced: 2025-01-28T01:47:47.340Z (4 months ago)
- Language: Java
- Size: 172 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# capacitor-callkit-voip
voip
## Install
```bash
npm install capacitor-callkit-voip
npx cap sync
```## API
* [`register(...)`](#register)
* [`incomingCall(...)`](#incomingcall)
* [`addListener('registration', ...)`](#addlistenerregistration)
* [`addListener('callAnswered', ...)`](#addlistenercallanswered)
* [`addListener('callStarted', ...)`](#addlistenercallstarted)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)### register(...)
```typescript
register(options: { topic: string; }) => Promise
```| Param | Type |
| ------------- | ------------------------------- |
| **`options`** |{ topic: string; }
|--------------------
### incomingCall(...)
```typescript
incomingCall(options: { from: string; }) => Promise
```| Param | Type |
| ------------- | ------------------------------ |
| **`options`** |{ from: string; }
|--------------------
### addListener('registration', ...)
```typescript
addListener(eventName: 'registration', listenerFunc: (token: Token) => void) => Promise & PluginListenerHandle
```| Param | Type |
| ------------------ | ----------------------------------------------------------- |
| **`eventName`** |'registration'
|
| **`listenerFunc`** |(token: Token) => void
|**Returns:**
Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
### addListener('callAnswered', ...)
```typescript
addListener(eventName: 'callAnswered', listenerFunc: (callDate: CallData) => void) => Promise & PluginListenerHandle
```| Param | Type |
| ------------------ | -------------------------------------------------------------------- |
| **`eventName`** |'callAnswered'
|
| **`listenerFunc`** |(callDate: CallData) => void
|**Returns:**
Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
### addListener('callStarted', ...)
```typescript
addListener(eventName: 'callStarted', listenerFunc: (callDate: CallData) => void) => Promise & 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