Platform SDK: Broadcast Architecture |
The following outline is an example of a "typical" enhancement broadcast. The enhancement broadcast for any particular show may vary from this model. In the following, a typical enhancement is defined as a stream that is well-formed and that contains one or more enhancement files. The process is as follows:
If the enhancement requires additional packages, it is recommended that you surround the package download with triggers whose script tracks the beginning and end of the transmission. This way, scripts on the base page can determined whether a package was completely received before displaying that package. This process is described in the following steps:
Start(2)
, where Start is a function implemented on the base page. The following ECMAScript illustrates how the Start function might be implemented:
global lastStart = 0; Start (packageNum) { lastStart = packageNum; }
NavigateTo(2,"NewFile.html")
, where NavigateTo is a function on the base page. The following ECMAScript illustrates how the NavigateTo function might be implemented:
NavigateTo(packageNum, url) { //verify that the package was completely received if (lastStart == packageNum) { //navigate to the specified url // . . . } //reset the global variable lastStart = 0; }
Repeatedly transmitting packages throughout the broadcast helps clients who tuned into the middle of an interactive show quickly get the information they need to display the enhancement.