Windows Media Player 11 SDK Using HTML with Windows Media Player 

Windows Media Player SDK banner art

Previous Next

Using HTML with Windows Media Player

Overview

Using HTML with Windows Media Player is an excellent way to combine audio and video with text and graphics. You can embed the Windows Media Player control in a Web page when you want to supplement your static content or create Web applications with digital media. When you want to supplement your digital media with HTML, on the other hand, you can display Web pages in the full mode of the Player by referencing them in Windows Media metafile playlists.

If you write custom programs that embed the Windows Media Player control in remote mode, you can also control the Web pages displayed in the various panes of the full mode of the Player when your users undock the control. This lets you preserve continuity between the docked and undocked states.

Web Embedding

You can use the Windows Media Player control as part of a Web page you create. See Embedding the Windows Media Player Control in a Web Page.

Script Commands and URL Flipping

Script commands are text/value pairs you can embed in your digital media files or streams. You might use custom script commands solely to trigger script code, while letting Windows Media Player handle other script commands automatically.

When you have several Web pages that accompany a digital media presentation, URL script commands can automatically change the page in one frame while the Windows Media Player control continues playing digital media in another frame. This is called URL flipping, and is an excellent way to create a multimedia slide show. Other automatically handled script commands let you switch playback to a different media file or stream, display captioning text, or trigger events such as ad insertions defined in a Windows Media metafile playlist.

For more information about URL flipping, see Creating Web-Based Presentations.

Rich Media Streaming

URL flipping works best with simple pages that load rapidly. With more complex pages, multiple components are transferred individually, making it difficult to synchronize page display with digital media. To allow complex rich media presentations, Web pages can be added to a media stream and delivered to the Player in the same way as audio and video. This lets you synchronize the components of your presentation much more easily, especially over low-speed connections.

For more information about rich media streaming, see Creating Web-Based Presentations.

Browser Support

You can embed the Windows Media Player control in both Microsoft Internet Explorer and in Netscape Navigator, although the process is slightly different for each. You can also create Web pages designed to work with both browsers.

With Internet Explorer, you embed the control using the HTML OBJECT element. Navigator requires a different approach, however, because it doesn't directly support ActiveX controls. With Navigator, you use the APPLET element to embed a special Java applet into the page. This applet handles communication with the Player ActiveX control.

For more information about Netscape Navigator support, see Using Windows Media Player with Netscape 7.1.

Displaying Web Pages in the Full Mode of the Player

You can extend the functionality of Windows Media Player or provide a custom view of information that accompanies your digital media by displaying Web pages in the full mode of the Player. This is the HTMLView feature of Windows Media metafiles. Metafiles give you great control over playlist content, allowing you to seamlessly transition between clips, insert advertisements, and display still images in Windows Media Player. To display Web pages in the full mode of the Player, you use the PARAM element to add URL references to your playlist entries or to entire playlists.

For more information about using Web pages in metafiles, see Displaying Web Pages in Windows Media Player.

See Also

Previous Next