@cs-chatbots/cobrowsing
v3.1.0
Published
Cobrowsing
Downloads
22
Maintainers
Keywords
Readme
Cobrowsing
Unified Cobrowsing Solution. It offers uniform control and appearance of the following solutions:
- Teamviewer (chatvisor)
- ~~Avaya (Live Support)~~ - not implemented yet
- ~~Unblu (embedded cobrowsing)~~ - not implemented yet
Integration
Installation
npm install @cs-chatbots/cobrowsing
Teamviewer provider integration example
import { cobrowsing, CobrowsingProvider } from '@cs-chatbots/cobrowsing'
const options = {
provider: CobrowsingProvider.TV,
scriptUri: 'https://staging.engage.teamviewer.com/cdn/js/abcdefgh.js'
}
const { init, isActive, start, stop } = cobrowsing(options);
start(); // Starts Teamviewer Cobrowsing session
Teamviewer Options
| Option | Description |
| --------- | ----------- |
| provider | Specified provider. E. g. CobrowsingProvider.TV
|
| scriptUri | Script URI of the Teamviewer solution E.g. 'https://staging.engage.teamviewer.com/cdn/js/abcdefgh.js'
|
| onStart | On start callback. It is triggered when the user starts the Cobrowsing session. |
| onStop | On stop callback. It is triggered when the user stops the Cobrowsing session. |
Teamviewer Functions
| method | description |
| -------- | ----------- |
| init | The init()
function. It should be called right after the page is loaded. Possibly during the bootstrap phase. It ensures that the selected solution is loaded and the Cobrowsing session continues. It was created primarily to ensure the continuity of the Cobrowsing session after the page reload. |
| isActive | The isActive()
function. Returns a boolean value which shows if the Cobrowsing session is active/connected. |
| start | The start()
function. Starts the Cobrowsing session. A small UI interface is shown where the session id is visible and the Cobrowsing session can be deactivated. |
| stop | The stop()
function. Stops the Cobrowsing session. The UI for closing the session is destroyed. Should be called on user logout if the Cobrawsing session is active. |
Development
npm install
npm run start
Dev server starts on http://localhost:4000/