Download SDK
Once you've published the SDK data, you can download the package for TIzen or webOS from the OneTrust tenant.
- Download
publishers-native-tizen-sdk-xxxxxx.x.x.zip
for Tizen OS (Samsung TVs) - Download
publishers-native-webos-sdk-xxxxxx.x.x.zip
for webOS (LG TVs)
What’s in the Download Package?
File | Description | Size |
---|---|---|
onetrust.js | This file contains all styles and business logic. | 1.9 MB |
onetrust_No__Polyfills.js | This file contains the business logic but no HTML/CSS-related polyfills. | 1.4 MB |
polyfills_corejs.js | This file contains the JavaScript-related polyfill packages like core-js. | 232 KB |
polyfills.js | This file contains the HTML/CSS-related polyfills such as append, grid, etc. | 157 KB |
OneTrustTVDemoApp | OneTrust built demo app of the CTV SDK. | 6.2 MB |
Implementation Options
There are two approaches you can take to implement the SDK in your app:
Option 1
Load only the onetrust.js
file as this contains the full SDK.
Option 2
Load onetrust_No_Polyfills.js
, polyfills_corejs.js
, and polyfills.js
separately. This code splitting technique allows you to implement lazy loading and reduce the file size. For example, you can have the flexibility to load the polyfill files before onetrust_No_Polyfills.js
which should reduce the initial payload size and improve loading times, especially on lower-end devices.
It's important to note that you must load polyfills_corejs.js
, and polyfills.js
before onetrust_No_Polyfills.js
to ensure polyfills are available before the business logic is introduced. You have the ability to add your own custom polyfills as well, just ensure they are loaded before onetrust_No_Polyfills.js
.
Sample code:
<body>
<script src="../../build/anyCustomPolyfills.js" type="text/javascript"></script>
<script src="../../build/polyfills.js" type="text/javascript"></script>
<script src="../../build/polyfills_corejs.js" type="text/javascript"></script>
<script src="../../build/onetrust_No_Polyfills.js" type="text/javascript"></script>
</body>
IMPORTANT
Do NOT include the
onetrust.js
file if using Option 2.
Updated 9 months ago