WebDVD Products & Techniques, Pt. 2
  February 12, 2001

StarGaze WebDVD JavaScript Development

Once the basic HTML page was completed, the next step was to write the JavaScripts for each unique DVD playback function that an end-user could invoke by pressing hyperlinked buttons. First the Windows Media Player Control was embedded into the page, configured to fit into the correct position within the page, and initialized to start playing a specific video sequence from the StarGaze DVD disc as soon as the page was launched. The following code is used to embed the Media Player control into the HTML page, and configure it correctly. As you can see from the code there are a large number of parameters that can be used to configure the Windows Media Player Control.

Code Sample 1: Media Player Control

To automatically start the Media Player control playing a specific item of content from the DVD-Video disc, the following JavaScript was inserted in the HTML page immediately after the Object declarations. This script tells Media Player to open the DVD-Video title and play chapter number 1 from Title 10. Once this chapter has finished Media Player will simply wait for further instructions from the end user.

  // Start playback of the bonus track