| ARRIS Enterprises, Inc. Confidential Information |
Channel TableChannel Tables, or a list of which channels are available, their names, URI's, and so on, can be handled in many ways. In most cases, an XHR request is sent from the portal to the operators backend server, which responds with the channel table for that STB. In this example portal, a default channel table is inserted into the boot image as it gets built. In addition, if an Infocast server broadcasts a channel table to the population of STBs then this would be received and would take priority over the default table. In both of these cases, the table is received and handled by the TOI Information Service. It appears as a configuration object which can be saved to flash memory, and the portal can attach callback events to this object to be notified of any changes. Configuration objects are useful in many other situations too, for example, storing the current channel, volume, mute state, the profile of the end-user currently logged in, etc. Saving these to flash memory means that should the STB restart, the values will be preserved and the portal can resume with the previous values. The TOI API also makes extensive use of configuration objects for controlling the STB behaviour and reading its status, which we will look at later on. <sdk_root>/examples/example-html-portal/channels.js
Here, the portal registers an event listener for
The name of the object, When the list changes
When the value of <sdk_root>/examples/example-html-portal/channels.js
The To simplify this example portal, when a change to the channel table occurs, the portal automatically zaps to the first channel in the new list. Obviously, in a real-world situation you should check if the channel currently playing is still in the table. You could also handle changes to just the channel names and numbers, the channel ordering, etc. This stuff was considered beyond the scope of the example portal. |