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

Developer Tools

KreaTV 5 introduces several new tools to assist with portal development. These tools allow you to edit the portal source code on a PC or Mac in a feature rich IDE such as Eclipse, enjoying full auto-completion of the TOI API.

Not only that, but you can debug these with Web Inspector, and all the time continue to use the TOI API to interact with the STB. This means that even with the portal running on your PC/Mac you can zap channels, change audio/subtitle tracks, use the remote control, put the STB in and out of standby, etc and so on. The STB no longer cares if the portal is running locally, or remotely across the network.

Remote TOI
Allows you to easily control the STB from another machine running TOI code, for example another STB, your development computer, or an app in a smart phone or tablet. The remote device remains connected to the target STB, and remote control inputs, network events, standby states and video playing commands are still completely functional.
Web Inspector
Allows you to access the DOM tree for your portal while it is running on the STB, inspecting and altering the DOM and CSS.
Console
Allows you to execute snippets of JavaScript code on the STB, interacting with your running portal.
TOI Definitions
If you edit your portal source code in an IDE such as Eclipse, this feature enables auto-completion for the TOI API functions and properties.

Remote TOI

Since TOI3 is implemented as a Web Service, this opens up a completely new kind of in-home STB communication. Since the KreaTV platform no longer cares where the client using TOI is located, the STB can easily be controlled from another STB, or by an app in a smart phone, or a tablet. With proper client authentication in place different multi-room scenarios can be supported using only TOI and without being limited by the functionality provided by other techniques (such as DLNA). For a UI developer, remote TOI access can be used to drive a UI running in the desktop browser and greatly enhances the development environment.

See the reference section for Remote TOI for details on how to initialize remote TOI.

Web Inspector

To use Web Inspector, you must first configure the boot image to enable support. You do this by providing a port argument to the portal IIP as follows:


# enable web inspector
kreatv-option-webkit-portal::startinfront
kreatv-option-webkit-portal:web_inspector_port=7000

Boot the STB with this boot image and load your portal. You can now connect to the STB from any WebKit-based browser (such as Safari) by navigating to the URL http://<set-top-box_ip_address>:7000/

You will be shown a list of Inspectable web views. Select the one you want to inspect and the web inspector UI will load:

Console

The JavaScript Console feature allows you to execute expressions and display the results, in the context of your running portal. This is very useful for debugging and experimenting with running portal code, as well as for learning and working with the TOI API.

Connect to the STB in the same way as described above for Web Inspector. Click the Console icon to enter the JavaScript Console. You now have access to global variables like window and document. If you have initialized TOI, you can also access all of the KreaTV platform services.

TOI definition files

Most common JavaScript IDE's provide an automatic code completion feature. Since TOI3 is a JavaScript language, you can benefit from this and speed up development of your portal. The KreaTV SDK contains JavaScript files which can be included in your project to enable TOI API auto-completion.

Setting up TOI definitions in Eclipse

  • Make sure that "Eclipse JavaScript Development Tools" plugin has been installed.
  • Create a new JavaScript project in Eclipse.
  • After the project is created, open the Project Properties page.
  • Open "Include path" -> "Source" -> "Link External Folder...", and add a path to
    <sdk_root>/tools/ide/autocomplete

You can now edit TOI portal code in your IDE, and enjoy auto-completion.

5.0.1

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