Video Advertising Suite

Docs

> Documentation-Index > Implementation Guide

HbbTV Sample App

Implementation Guideline

2. Adding the smartclientcore

The smartclientcore is provided as a JavaScript file smartclientcore.min.js that can be used in two ways:

  • As a module using ES6 import
    import smartclientcore from 'vendor_modules/smartclip/smartclientcore.min';
  • As a global object by adding the file to the video player's page
    <script type="text/javascript" src="vendor_modules/smartclip/smartclientcore.min.js"></script>

Details about importing the smartclientcore can be found in the latest core documentation under vendor_modules/smartclip/docs.

For the sake of convenience the sample app uses the second approach by putting the advertising library before the player API source file.

--- index.html
+++ index.html

+    <script type="text/javascript" crossorigin="anonymous" src="vendor_modules/smartclip/smartclientcore.min.js"></script>
     <script type="text/javascript" crossorigin="anonymous" src="js/main.js"></script>

Extract from the index.html :: Adding the smartclientcore

Next: Safeguarding the Video Player
Prev: Player Prerequisites
Top: Implementation Guide Overview