what's the proper way of embedding a wmv file to a site using the object element?
| SitePoint Sponsor |

what's the proper way of embedding a wmv file to a site using the object element?
I haven't seen OBJECT used with wmv. Instead, I've seen authors link directly to the wmv file with an A element. The file is then opened by a browser plugin or desktop application, as determined by the browser's configuration.
To have the video play in the page, you could convert it to a Flash movie and use an embeddable Flash player, or perhaps someone else can suggest an alternative solution.

I found 2 different examples not sure which one to use...
Code HTML4Strict:<object id="VIDEO" width="320" height="240" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> <param name="URL" value="your file or url"> <param name="SendPlayStateChangeEvents" value="True"> <param name="AutoStart" value="True"> <param name="uiMode" value="none"> <param name="PlayCount" value="9999"> </object>
Code HTML4Strict:<object type="video/x-ms-wmv" data="data/test.wmv" width="320" height="255"> <param name="src" value="data/test.wmv"> <param name="autoStart" value="0"> alt : <a href="data/test.wmv">test.wmv</a> </object>

I would seriously advise against embedding a WMV object within the page. Relying on a media player is a poor approach to take when as someone rightly pointed above, flash can play media and has a much higher market adoption rate. If you use WMV you run the risk that your visitors will not be able to view your video.
That second example is the more cross browser method. WMP is bundled with Windows, and Linux has several media players, especially mplayer, that can handle wmv files. Those running a desktop environment probably have an appropriate player installed.
OSⅩ should also have either mplayer or WMP.
cheers,
gary
Anyone can build a usable website. It takes a graphic
designer to make it slow, confusing, and painful to use.
Simple minded html & css demos and tutorials

Thanks for your replies.
Its for an intranet site and IE7 is the standard.
Anyone can build a usable website. It takes a graphic
designer to make it slow, confusing, and painful to use.
Simple minded html & css demos and tutorials

Bookmarks