• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

TV Open Interface (TOI) 3

Welcome to TOI3/JS, the next generation JavaScript access to the KreaTV platform!

TOI/JS is the API that empowers the TV portal with the KreaTV platform capabilities. By using TOI/JS the TV portal has full control of the STB and the platform behaviour to ensure a great user experience. Architecturally the KreaTV platform is divided into different services with well-defined areas of responsibilities. TOI/JS reflects this and the APIs are service centric; containing both functions for making requests to the platform and with asynchronous events that informs of changes in a particular service.

TOI/JS has evolved over time and has now reached version 3 in KreaTV 5. In this version the goal has been to follow the JavaScript paradigm and make the API easy to work with for portal application developers. To keep the API feeling familiar for our existing developers changes have only been made where it will really make a difference during the development process. One example of a fundamental change is the shift from NPAPI to instead use a web server in the platform to handle the TOI/JS communication. This empowers KreaTV with a TOI/JS environment that is 100% in JavaScript with no plugin limitations.

Initialization

In TOI2/JS, we provided the JavaScript binding through the use of an NPAPI plugin. When the plugin was embedded into a portal page, a global instance of a toi object was created. An important change between TOI2/JS and TOI3/JS is that the NPAPI plugin has been replaced by web services to provide the JavaScript binding. This only impacts the initial bootstrapping. To obtain the toi object, an HTTP GET request is sent to a local web server. After this initialization a toi object will be available for portal application to use.

Implemented with web services

In TOI3/JS, a web server in the KreaTV platform handles all TOI requests and notifications using standardized protocols like HTTP and websockets. This mechanism is hidden from the portal developer, and is encapsulated in a JavaScript TOI object with easy-to-use APIs very similar to what has been available in KreaTV 4.x. The UI uses standard JavaScript calls since a JS wrapper is provided by the platform when the UI makes its initial HTTP GET request. The JS wrapper utilizes XHR for synchronous TOI calls, and Websockets for asynchronous platform notifications. By changing technology to the web server approach with a JavaScript wrapper on top, TOI3/JS offers APIs that are easier to use and much more aligned with the familiar JavaScript paradigm.

Examples of these enhancements include the use of optional values, a new abstraction for asynchronous operations and their results, proper exception types, lazy loading of platform service APIs and much more.

Forward thinking

By using a web server for TOI3/JS it means that there is no major difference from the KreaTV platforms perspective if the application is running on the STB, or somewhere else on the network. This can be used both during development to drive a UI on a desktop by a target TOI object, and also in deployment to enable platform access for companion devices. This functionality will be the next step for TOI3/JS and will be used to simplify and shorten portal application development cycles.

5.1.p5

Copyright (c) 2017 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.