Embedding Windows Media, Part 1

Microsoft’s suggested way of embedding Windows format movies and sounds on your Web page still requires the use of the old nonstandard embed tag—if you want it to work in anything besides Internet Explorer for Windows. I’ll show you how to embed it in a standards-compliant way on page 304.

To embed Windows Media Player files:

1.
Create the desired movie or sound.
2.
In your (X)HTML document, type <object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" id="player".
3.
Next type width="w" height="h", where w and h are the size in pixels of the media player that you’d like to embed.
4.
Type > to complete the initial object tag.
5.
To tell the player where the media file is, type <param name="url" value="movie.wmv"> ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.