Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding Windows Media Player for all browsers

Edit: This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a format supported by your browsers (That would be H.264 if Internet Explorer is needed, and probably AV1, VP8/VP9 if not) and use the <video> element.


We are using WMV videos on an internal site, and we are embedding them into web sites. This works quite well on Internet Explorer, but not on Firefox. I've found ways to make it work in Firefox, but then it stops working in Internet Explorer.

We do not want to use Silverlight just yet, especially since we cannot be sure that all clients will be running Windows XP with Windows Media Player installed.

Is there some sort of Universal Code that embeds WMP into both Internet Explorer and Firefox, or do we need to implement some user-agent-detection and deliver different HTML for different browsers?

like image 593
Michael Stum Avatar asked Aug 01 '08 18:08

Michael Stum


People also ask

How do I enable Windows Media Player plugins in Chrome?

Windows Media Player To enable the plug-in, download the appropriate version for your operating system, then run the setup file. The player should install itself. You must restart Chrome to fully enable WMP.

How do I embed a WMV file in HTML?

To embed WMV video in your web page, open the HTML file and add the following lines of code. Replace mydomain.com with your own domain and sample. wmv with the path and file name of your own WMV file. Note that embedded WMV files are not supported in some web browsers.


1 Answers

The following works for me in Firefox and Internet Explorer:

<object id="mediaplayer" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701" standby="loading microsoft windows media player components..." type="application/x-oleobject" width="320" height="310"> <param name="filename" value="./test.wmv">      <param name="animationatstart" value="true">      <param name="transparentatstart" value="true">      <param name="autostart" value="true">      <param name="showcontrols" value="true">      <param name="ShowStatusBar" value="true">      <param name="windowlessvideo" value="true">      <embed src="./test.wmv" autostart="true" showcontrols="true" showstatusbar="1" bgcolor="white" width="320" height="310"> </object> 
like image 87
Grant Avatar answered Oct 19 '22 05:10

Grant