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

Internet Surf in WebKit

Introduction

KreaTV supports basic internet surf as part of portal in WebKit.

To use this feature the portal is expected to open an IFrame for the internet surf session. And the URL in internet surf is not limited to be in trusted portal URLs cfg.portal.whitelisturls

When the browser opens an IFrame in internet surf mode, all KreaTV TOI plugins and other NPAPI plugins are disabled in that frame.

Sample code


<!DOCTYPE html>
<html>
  <head>
    <style>
      body{
        background-color: #DDDDDD;
      }
      #iframe{
        height: 90%;
        width: 100%;
        position: fixed;
        top: 10%;
        left: 0;
        background-color: white;
      }
      #urlfield{
        position: fixed;
        top: 5%;
        width: 80%;
        margin: 0 10%;
      }
      #submitbutton{
        position: fixed;
        top: 5%;
        left: 90%;
        margin-left: 20px;
      }
      #backlink{
        position: fixed;
        top: 5%;
        margin-left: 20px;
      }
    </style>
    <script>
      function main(){
        var form = document.getElementById("urlform");
        var iframe = document.getElementById("iframe");
        var urlfield = document.getElementById("urlfield");
        form.addEventListener("submit", function(e){
          iframe.src=urlfield.value;
          e.preventDefault();
        }, false);
      }
    </script>
  </head>
  <body onload="main()">
    <a href="../" id="backlink">Back</a>
    <form id="urlform">
      <input type="text" id="urlfield" value="http://">
      <input type="submit" id="submitbutton" value="Go">
    </form>
    <iframe id="iframe" sandbox="allow-scripts allow-same-origin"></iframe>
  </body>
</html>

Passing Key Events from Internet Surf Session to Portal

When an internet site is opened in an IFrame, normal sandboxing rules for HTML frames apply. This means that the portal will for example not be able to detect when a user presses EXIT or similar on the RCU to end the internet surf session and get back to the portal. To overcome this problem, the portal requires some custom method of monitoring the key presses in the internet surf session. A key monitor service in the "kreatv-option-keyman" IIP is intended for this. Please refer to the description of "kreatv-option-keyman" IIP and the "TEI key monitoring service" documentation in SDK manual for further information.

Limitations

  • Some internet sites use the X-Frame-Options HTTP response header to guard against being opened in a Frame on an IFrame. These sites will not be compatible with the internet surf feature in WebKit, and will fail to load.
  • There is no process separation between the portal and the internet surf session. This means that a malicious internet site can force an unexpected reboot of the STB.
  • Many internet browser features are missing:
    • There is no virtual keyboard
    • There is no mouse pointer
    • There is no progress bar when loading web pages
    • There are no scroll bars
    • There is no custom support for highlighting the currently selected link on the web page, making navigation on some pages difficult.
    • The scrolling of a web page can only be done by jumping between the links on the web page. This means that some parts of a web page may become inaccessible.
  • Internet surf typically requires more fonts installed on the STB.
  • Internet surf typically requires more memory, it’s a known issue that the STB may crash or reboot due to lack of memory while internet surfing/browsing. To prevent this from happening, the “soft_memory_limit” parameter of “kreatv-app-webkit-portal” should be used.

5.0.1

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