Portal Initialization
The portal application begins with the following initialization routine:
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()
.