Skip to main content

Installation

  1. To use the SDK in your website, simply add the following script tag to your HTML pages:
<script src="https://cdn.storyxpress.co/tesseract/lib/ts-recordersdk-v3.2.4.min.js"></script>
  1. Once SX RecorderSDK has been loaded to your DOM, initialize the SDK using your credentials as shown below:
const sdk = await Tesseract.ui.config(CLIENT_ID, CLIENT_SECRET);

// sx-tesseract-root is default shadow-root name
const rootElement = document.getElementById("sx-tesseract-root");

const config = {
UserProperties: {
userId: "USER_ID",
},
RootElement: rootElement
};

sdk.init(config);
  1. SX RecorderSDK can be removed from your DOM using SDK.prototype.remove function as shown below.
sdk.remove();