Embedding Windows Media, Part 2






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. 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.


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).




 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows