Stream and Application Switching
The CloudTV Platform runs across multiple devices, allowing an application to run in any resolution supported by the device, and provides for near-transparent hand-offs between applications via multiple methods. The most common method is to replace the current application URL with the new application URL. For example:
Or alternatively, keeping the current application beneath the application being launched. This method can stack up more resource utilization as memory being consumed by each window in the stack is not released until that window is closed. So window.open() followed by window.open() followed by window.open() — must be managed to balance the footprint of the application and the benefits of leaving an application stack open for an extended navigation session.
The following flows require special treatment:
- Switching Resolution - launching an SD 640x480 application from an HD 1280x720 application
- Launching a TAG Game
- Navigating to a resident application on the client device, such as VOD or channel tuning
To switch resolution, an application must call a CloudTV-specific function __openUrl__(). The prefix for launching an H5 application is webkit: and the URL of the application must be provided in full. So to launch an application that lives one folder up from the current application at 'index2.html', and display it at 640x480, you would use this code:
When run on the current page, the above example would produce the following URL to be launched:
Launching a Tag Game
TAG games are a unique case, because the streaming server begins talking to the TAG game server for rendering as opposed to the HTML5 engine. Therefore, a unique protocol is used, which is:
The "GAME" is optional, and can take the name of any game, such as "bejewled" or "poker". If the "GAME" parameter is not provided, the TAG Game Catalogue will be loaded.
Navigating to a Resident Application or Channel Tuning
Each device is capable of providing its own applications in addition to the CloudTV Platform. One common resident application is a VOD streaming application which handles video on demand play-out. There are several unique protocols for commonly installed resident applications which are normalized as best as possible across clients. These are: