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

The Secondary Browser

The secondary browser is a Technical Preview. Its behavior may change.

The secondary browser is a secondary application in KreaTV. It serves as a generic browser that can be used to display arbitrary web pages. It runs as its own process separated from the portal, and does not provide TOI access to the pages that it loads.

Configuration

To enable support for the secondary browser, add the following lines to your boot image configuration:


kreatv-app-webkit-browser
kreatv-license-multiapp

Loading a webpage

The secondary browser interprets the second argument to ToiSecondaryApplication.start() as the URL to load. The secondary browser will start loading the page and switch to STATE_HIDDEN.

The secondary browser does not wait for the page to finish loading before entering STATE_HIDDEN. It makes the state transition as soon as it has something to render to the screen.

Special behaviors

Exiting

Besides calling ToiSecondaryApplication.stop(), the secondary browser will be closed if window.close() is called in the page it has loaded.

Transition URLs

Web apps that require the use of media playback resources must respect the concept of playback ownership. Some web apps may support suspending playback via the use of anchor tags, others may have to be unloaded in order for playback resources to be freed.

To make this possible, the secondary browser has the concept of transition URLs. By adding special tags to the StartUrl, the URL can be changed by substituting the tag for an application property when the secondary browser changes state. The modified URL is then loaded during the transition. Loading the modified URL follows the same rules as loading a URL via other means in that adding an anchor tag will typically not trigger a full page reload but changing the URL path will.

Showing

When the browser transitions from STATE_HIDDEN to STATE_VISIBLE, it will search the StartUrl for the #TRANSITION_ARGS tag and replace it with the contents of the application property TransitionToVisibleArgs. If either the tag or the application property do not exist, no action is performed. Otherwise, the modified StartUrl is loaded.

An exception to the above occurs the first time the browser transitions from STATE_HIDDEN to STATE_VISIBLE after having been started and the application property FirstTransitionToVisibleArgs exists. Under those circumstances, that property is used instead of TransitionToVisibleArgs.

Hiding

When the browser transitions from STATE_VISIBLE to STATE_HIDDEN, it will read the TransitionToHiddenArgs property. Then it will read StartUrl and substitute #TRANSITION_ARGS with TransitionToHiddenArgs as the final url to load.

Example

If we have configuration in browser-properties.xml:


  <Property name="StartUrl">https://www.myvideoservice.com/#TRANSITION_ARGS</Property>
  <Property name="TransitionToVisibleArgs">#start?#START_ARGS</Property>
  <Property name="TransitionToHiddenArgs">#suspend</Property>

When browser is started by primary portal with ToiSecondaryApplication.start(callbacks, parameters), its showing url will be constructed as https://www.myvideoservice.com/#start?parameters.

When browser go to STATE_VISIBLE with ToiSecondaryApplication.show(callbacks), it will load its showing url constructed above.

When browser go to STATE_HIDDEN, it will load https://www.myvideoservice.com/#suspend.

5.1.1.p8

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