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
- Host: GitHub
- URL: https://github.com/softcand/supsis-visitor-rn
- Owner: softcand
- License: mit
- Created: 2023-01-09T10:05:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-09T15:37:33.000Z (over 1 year ago)
- Last Synced: 2025-01-09T16:54:18.082Z (over 1 year ago)
- Topics: livesupport, react-native, typescript, webchat
- Language: JavaScript
- Homepage:
- Size: 2.34 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)