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?

FileDescriptionSize
onetrust.jsThis file contains all styles and business logic.1.9 MB
onetrust_No__Polyfills.jsThis file contains the business logic but no HTML/CSS-related polyfills.1.4 MB
polyfills_corejs.jsThis file contains the JavaScript-related polyfill packages like core-js.232 KB
polyfills.jsThis file contains the HTML/CSS-related polyfills such as append, grid, etc.157 KB
OneTrustTVDemoAppOneTrust 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.jswhich 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.jsfile if using Option 2.