1.2.3 • Published 6 months ago

@supsis/visitor-rn v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Supsis Visitor

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

Installation

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:
<key>NSCameraUsageDescription</key>
<string>Camera access is required for live video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for live video calls</string>
  • Android - Add the following permissions to your AndroidManifest.xml file(Most of using for video & audio chat ):
 	<uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

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.

Usage

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

// ...

const supsisRef = useRef < RefsInterface > null;

return (
	<Container>
		<SupsisVisitor ref={supsisRef} domainName={"DOMAIN_NAME"} />
	</Container>
);

Commands for refs

Example:

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

Visitor Connected & Destroyed Chat

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 (
	<Container>
		<SupsisVisitor
			ref={supsisRef}
			domainName={"DOMAIN_NAME"}
			onDisconnected={onDisconnected}
			onConnected={onConnected}
		/>
	</Container>
);

Support

If you need any help, you can chat with us here.

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

License

MIT

1.2.0

8 months ago

1.1.9

8 months ago

1.1.8

8 months ago

1.1.7

8 months ago

1.2.3

6 months ago

1.2.2

7 months ago

1.2.1

8 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago