Using The SDK
Instructions on using our SDK
The Sandboxed iFrame
Your HTML code is an iframe srcdoc which is sandboxed preventing the code inside from navigating the top frame or breaking out of the sandbox. You must code appropriately as certain things will be prohibited for app stability and security reasons such as navigating the top (parent) frame. The sandbox has the following permissions: allow-scripts, allow-same-origin, allow-forms. All other permissions are prohibited.
SDK is Automatically Injected
The TelemetryTV SDK is automatically injected within the Webapp/Overlay iframe and available for you to use. It will take some time however to receive all the properties from its parent so you will need to react to a callback in order to access the properties and do the work that any javascript you include requires.
The SDK works within the sandboxed iframe and is unavailable in "Git" type Webapps. So we have decided to make the SDK available as a module SDK. Because of this, you will have to install the SDK as a dependency in your project.
Using a Package Manager
First select your preferred Package Manager to install the SDK.
With NPM:
npm install @telemetrytv/sdk
With Yarn:
yarn add @telemetrytv/sdk
With PNPM:
pnpm add @telemetrytv/sdk
It is no longer necessary to use a callback function to wrap your codes within thewindow.onloadTelemetryTV.
Instead now you can use:
import { startOverride } from '@telemetrytv/sdk'
startOverride('Target Override Name')
Updated 4 months ago