# react-native-verto

> Verto FreeSWITCH React Native

Latest version **0.1.3** (published 2019-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-verto
pnpm add react-native-verto
yarn add react-native-verto
bun add react-native-verto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-10-24 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 71.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Rizvan Rzayev |
| Maintainers | rizvanrzayev |
| Keywords | react-native, verto, react-native-verto, communicator, verto communicator |

## Links

- npm: https://www.npmjs.com/package/react-native-verto
- Repository: https://github.com/rizvanrzayev/react-native-verto
- Homepage: https://github.com/rizvanrzayev/react-native-verto#readme
- Issues: https://github.com/rizvanrzayev/react-native-verto/issues
- npm.io page: https://npm.io/package/react-native-verto

## Recent versions

- 0.1.3 (latest) — 2019-10-24
- 0.1.2 — 2019-10-24
- 0.1.1 — 2019-10-24
- 0.1.0 — 2019-10-24

## README

# react-native-verto

## Getting started

## Installation

#### npm:
`$ npm install react-native-verto --save`

#### yarn:
`$ yarn add react-native-verto`

### For use this library you must be link `react-native-webrtc`

React Native version < 0.60

Follow `react-native-webrtc` installation from this [link](https://github.com/react-native-webrtc/react-native-webrtc/#installation):

React Native version >= 0.60 (**auto-linking**)

#### For iOS
`cd ios/ && pod install && cd .. && react-native run-ios`

#### For Android
`react-native run-android`

## Usage

### VertoView

```javascript
import {VertoView} from 'react-native-verto';

const vertoParams = {
	websocket: {
		login: '<username>@<wsHost>',
		password: '<password>',
		url: 'webSocketURL'
	},
	deviceParams: {
		useMic: 'any',
		useSpeak: 'any',
		useCamera: 'any',
	}
}

const callbacks = {
	onPrivateEvent: (vertoClient, dataParams, userData) => {},
	onEvent: (vertoClient, dataParams, userData) => {},
	onInfo: (params) => {},
	onClientReady: (params) => {},
	onNewCall: (call: Call) => {},
	onPlayLocalVideo: (stream: MediaStream) => {},
	onPlayRemoteVideo: (stream: MediaStream) => {},
}

return(
	<VertoView vertoParams={vertoParams} callbacks={callbacks}/>
)
```

### VertoClient

```javascript
import {VertoClient} from 'react-native-verto';

const vertoParams = {
	websocket: {
		login: '<username>@<wsHost>',
		password: '<password>',
		url: 'webSocketURL'
	},
	deviceParams: {
		useMic: 'any',
		useSpeak: 'any',
		useCamera: 'any',
	}
}

const callbacks = {
	onPrivateEvent: (vertoClient, dataParams, userData) => {},
	onEvent: (vertoClient, dataParams, userData) => {},
	onInfo: (params) => {},
	onClientReady: (params) => {},
	onNewCall: (call: Call) => {},
	onPlayLocalVideo: (stream: MediaStream) => {},
	onPlayRemoteVideo: (stream: MediaStream) => {},
}

let vertoClient = new VertoClient(vertoParams, callbacks)
```

### METHODS

**destroy**

```javascript
vertoClient.destroy()
```

### Callbacks

* `onInfo`
* `onClientReady`
* `onNewCall`
* `onPlayLocalVideo`
* `onPlayRemoteVideo`

---
_Source: https://npm.io/package/react-native-verto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
