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

Portal Initialization

The portal application begins with the following initialization routine:

<sdk_root>/examples/example-html-portal/index.js

toi = this.createToiInstance();
toi.onload = function() {
  this.createMediaPlayer();
  ...
}.bind(this);

This creates a global toi instance, which provides the TOI API as it's properties, for example, toi.ToiMediaService. More information about creating the toi instance can be found under TOI bootstrapping.

As the creation of the toi instance is asynchronous, the portal defines a toi.onload function. All further calls to TOI, such as setting up the media player, are performed from this onload function. No TOI code should be executed before the KreaTV platform calls toi.onload().

The portal then calls its createMediaPlayer()

.

5.0.1

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