Embedding Windows Media, Part 2


Microsoft would like you to embed Windows Media with the classid attribute that calls the ActiveX control. That classid attribute, because it is non-standard, causes other browser to ignore the object. While I was researching this chapter, I discovered a new, standards-compliant way of embedding Window Media files that works on all major browsers, except Safari 2.

To embed Windows Media in a standards-compliant way:

1.

Begin the movie by typing <object.

2.

Specify the MIME type for Windows Media File movies by entering type="video/x-ms-wmv".

3.

Indicate the name and location of the movie on your server with data="filename.wmv".

4.

Specify the dimensions of your movie in pixels with width="w" height="h".

5.

Complete the opening object tag with >.

6.

Help IE and Safari 1 find the movie by reiterating its URL by typing <param name="src" value= "filename.wmv" />, where filename.wmv matches what you used in step 3.

7.

Add other param elements as desired.

8.

Complete the object element with </object>.

Figure 18.46. If you omit the Microsoft-specific classid attribute, and add the proper MIME type, you can use just the standard object element to embed Windows Media Files.


Figure 18.47. The Windows Media Player is embedded in the page.


Tip

  • This technique works in Internet Explorer, Firefox, Opera and Safari 1 (but unfortunately not Safari 2).





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net