An open API service indexing awesome lists of open source software.

https://github.com/softcand/supsis-visitor-rn

This is a React Native component to easily add Supsis Visitor screen to your application
https://github.com/softcand/supsis-visitor-rn

livesupport react-native typescript webchat

Last synced: 5 months ago
JSON representation

This is a React Native component to easily add Supsis Visitor screen to your application

Awesome Lists containing this project

README

          

# Supsis Visitor

This is a React Native component to easily add Supsis Visitor screen to your application.

## Installation

```sh
npm install @supsis/visitor-rn react-native-webview@^13.12.4

or

yarn add @supsis/visitor-rn react-native-webview@^13.12.4
```

## Prerequisites

- iOS - To enable camera and microphone access in your app, add the following keys to your Info.plist file:

```xml
NSCameraUsageDescription
Camera access is required for live video calls
NSMicrophoneUsageDescription
Microphone access is required for live video calls
```

- Android - Add the following permissions to your AndroidManifest.xml file(Most of using for video & audio chat ):

```xml





```

To use SupsisVisitor in your React application, you will need the Supsis license ID.

- `domainName` - Defines the name of your application
- For instance , namespace - `mycompany` - for mycompany.supsis.live
If you don't have an account, you can create one [here](https://supsis.com/).

## Usage

```tsx
import { RefsInterface, SupsisVisitor } from "@supsis/visitor-rn";

// ...

const supsisRef = useRef < RefsInterface > null;

return (



);
```

### Commands for refs

openmakes visible supsis
closemakes invisible supsis
setUserDatafills login form
setDepartmentallows you to pick a department
setContactPropertyfills contact properties
clearCacheclear visitor data
onMinimizeminimize getter for component

Example:

```ts
supsisRef.current?.setUserData({
email: "John@doe.com",
});
```

### Visitor Connected & Destroyed Chat

```tsx
import { RefsInterface, SupsisVisitor } from "@supsis/visitor-rn";

const supsisRef = useRef < RefsInterface > null;

const onDisconnected: void = () => {
console.log("Visitor Disconnected from Chat!");
};

const onConnected: void = () => {
console.log("Visitor Disconnected from Chat!");
};

return (



);
```

## Support

If you need any help, you can chat with us [here](https://supsis.com/).

I hope you will find this module useful. Happy coding!

## License

[MIT](./LICENSE)