• Release Notes
  • User
  • Admin
  • Developers
  • Integrations

›JS API

General

  • Overview
  • LiveView / CoBrowsing / Session Recordings

JS API

  • Overview
  • CoBrowsing
  • LiveView / Session Recordings
  • WebChat
  • Web Calling
  • Video Conference
  • Logging
  • User
  • Team
  • API
  • Supported Browsers
  • Supported Technologies

Android

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

iOS

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

Flutter

  • Overview
  • Installation
  • Usage
  • Reference

Capacitor

  • Overview
  • Installation
  • Usage
  • Reference

JavaScript API Overview

By using our JavaScript API you can adapt our core library for you needs in your application. For example you can build your own UI snippet to start our join the session if you need it.

The Chatvisor library adds an global CV object to the window object. This object contains the public API which is described in the several sections in this documentation.

window['CV']

JavaScript File

You can configure your Chatvisor tenant with plugins (i.e. WebChat, LiveView...). To be able to use these plugins, it is necessary to include a JavaScript file into your webpage where you want to use it. For that, Chatvisor generates one JavaScript file depending on your plugins what you have selected.

https://cdn.chatvisor.com/cdn/js/<ID>.js

You get only one file which is automatically generated regarding your plugin configuration. It doesn't matter how many plugins you have activated, the JavaScript is automatically compiled and deployed to our CDN.

Implementation

Go to page.

Initialization

If the JavaScript file is loaded async or deferred it is necessary to wait until the script is initialized. To realize this, it is possible to register a window['CVLOADED'] on the window object.

function initFunction() {
    // your code
}

if (!window.CVLoaded) {
    window.CVLoaded = initFunction;
} else {
    initFunction();
}

CDN

We leverage the CDN of AWS (https://aws.amazon.com/de/cloudfront/). The JavaScript file is automatically distributed over several datacenters around the world which guarantees you an optimal performance for the JavaScript all over the world.

Regeneration time

If you update the plugin configuration the JavaScript file is automatically regenerated and uploaded to the CDN. This can take up to ~1min. In general your browser caches the JavaScript file for a maximum of two hours. So if your want to test it immediately, please reload your page with an empty cache (i.e. reload with ctrl + f5).

← LiveView / CoBrowsing / Session RecordingsCoBrowsing →
MANUALS
User Manual: Sales Suite
Admin Manual: Sales Suite
User Manual: Support Suite
Admin Manual: Support Suite
DEVELOPERS
Integrations
REST API
SDK API
LEGAL
Privacy Policy
Terms and Conditions
Imprint
Engage
Copyright © 2024 TeamViewer Austria GmbH