<p><strong>Edit:</strong> 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 <a href="https://videojs.com/html5-video-support/" rel="noreferrer">supported by your browsers</a> (That would be H.264 if Internet Explorer is needed, and probably AV1, VP8/VP9 if not) and use the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video" rel="noreferrer"><code>&lt;video&gt;</code> element</a>.</p>
<hr />
<p>We are using <a href="http://en.wikipedia.org/wiki/Windows_Media_Video" rel="noreferrer">WMV</a> 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.</p>
<p>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.</p>
<p>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?</p>

[{'answer_id': 167, 'author': 'Grant', 'author_id': 30, 'author_profile': 'https://Stackoverflow.com/users/30', 'pm_score': 3, 'selected': False, 'text': "<p>You could use conditional comments to get IE and Firefox to do different things</p>\n\n<pre><code>&lt;![if !IE]&gt;\n&lt;p&gt; Firefox only code&lt;/p&gt;\n&lt;![endif]&gt;\n\n&lt;!--[if IE]&gt;\n&lt;p&gt;Internet Explorer only code&lt;/p&gt;\n&lt;![endif]--&gt;\n</code></pre>\n\n<p>The browsers themselves will ignore code that isn't meant for them to read.</p>\n"}, {'answer_id': 407, 'author': 'Polsonby', 'author_id': 137, 'author_profile': 'https://Stackoverflow.com/users/137', 'pm_score': 3, 'selected': False, 'text': '<p><s>The best way to deploy video on the web is using Flash - it\'s much easier to embed cleanly into a web page and will play on more or less any browser and platform combination. The only reason to use Windows Media Player is if you\'re streaming content and you need extraordinarily strong digital rights management, and even then providers are now starting to use Flash even for these. See BBC\'s iPlayer for a superb example.</p>\n\n<p>I would suggest that you switch to Flash even for internal use. You never know who is going to need to access it in the future, and this will give you the best possible future compatibility.</s></p>\n\n<p>EDIT - March 20 2013. \nInteresting how these old questions resurface from time to time! How different the world is today and how dated this all seems. I would not recommend a Flash only route today by any means - best practice these days would probably be to use HTML 5 to embed H264 encoded video, with a Flash fallback as described here: <a href="http://diveintohtml5.info/video.html" rel="noreferrer">http://diveintohtml5.info/video.html</a></p>\n'}, {'answer_id': 699, 'author': 'Grant', 'author_id': 30, 'author_profile': 'https://Stackoverflow.com/users/30', 'pm_score': 7, 'selected': True, 'text': '<p>The following works for me in Firefox and Internet Explorer:</p>\n\n<pre class="lang-html prettyprint-override"><code>&lt;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"&gt;\n&lt;param name="filename" value="./test.wmv"&gt;\n     &lt;param name="animationatstart" value="true"&gt;\n     &lt;param name="transparentatstart" value="true"&gt;\n     &lt;param name="autostart" value="true"&gt;\n     &lt;param name="showcontrols" value="true"&gt;\n     &lt;param name="ShowStatusBar" value="true"&gt;\n     &lt;param name="windowlessvideo" value="true"&gt;\n     &lt;embed src="./test.wmv" autostart="true" showcontrols="true" showstatusbar="1" bgcolor="white" width="320" height="310"&gt;\n&lt;/object&gt;\n</code></pre>\n'}, {'answer_id': 971, 'author': 'Peter Burns', 'author_id': 101, 'author_profile': 'https://Stackoverflow.com/users/101', 'pm_score': 2, 'selected': False, 'text': '<p>Encoding flash video is actually very easy with ffmpeg.  You can use one command to convert from just about any video format, ffmpeg is smart enough to figure the rest out, and it\'ll use every processor on your machine.  Invoking it is easy:</p>\n\n<pre><code>ffmpeg -i input.avi output.flv\n</code></pre>\n\n<p>ffmpeg will guess at the bitrate you want, but if you\'d like to specify one, you can use the -b option, so <code>-b 500000</code> is 500kbps for example.  There\'s a ton of options of course, but I generally get good results without much tinkering.  This is a good place to start if you\'re looking for more options: <a href="http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC9" rel="nofollow noreferrer">video options</a>.</p>\n\n<p>You don\'t need a special web server to show flash video.  I\'ve done just fine by simply pushing .flv files up to a standard web server, and linking to them with a good swf player, like <a href="http://flowplayer.org/" rel="nofollow noreferrer">flowplayer</a>.</p>\n\n<p>WMVs are fine if you can be sure that all of your users will always use [a recent, up to date version of] Windows only, but even then, Flash is often a better fit for the web.  The player is even extremely skinnable and can be controlled with javascript.</p>\n'}, {'answer_id': 6230, 'author': 'Jake McGraw', 'author_id': 302, 'author_profile': 'https://Stackoverflow.com/users/302', 'pm_score': 4, 'selected': False, 'text': '<p>May I suggest the <a href="http://malsup.com/jquery/media/" rel="noreferrer">jQuery Media Plugin</a>? Provides embed code for all kinds of video, not just WMV and does browser detection, keeping all that messy switch/case statements out of your templates.</p>\n'}, {'answer_id': 278953, 'author': 'Jim Nelson', 'author_id': 32168, 'author_profile': 'https://Stackoverflow.com/users/32168', 'pm_score': 3, 'selected': False, 'text': '<p>Elizabeth Castro has an interesting article on this problem: <a href="http://www.alistapart.com/articles/byebyeembed/" rel="noreferrer">Bye Bye Embed</a>.  Worth a read on how she attacked this problem, as well as handling QuickTime content.</p>\n'}, {'answer_id': 1227988, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>Use the following. It works in Firefox and Internet Explorer.</p>\n\n<pre><code>        &lt;object id="MediaPlayer1" width="690" height="500" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"\n            codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"\n            standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject"\n            &gt;\n            &lt;param name="FileName" value=\'&lt;%= GetSource() %&gt;\' /&gt;\n            &lt;param name="AutoStart" value="True" /&gt;\n            &lt;param name="DefaultFrame" value="mainFrame" /&gt;\n            &lt;param name="ShowStatusBar" value="0" /&gt;\n            &lt;param name="ShowPositionControls" value="0" /&gt;\n            &lt;param name="showcontrols" value="0" /&gt;\n            &lt;param name="ShowAudioControls" value="0" /&gt;\n            &lt;param name="ShowTracker" value="0" /&gt;\n            &lt;param name="EnablePositionControls" value="0" /&gt;\n\n\n            &lt;!-- BEGIN PLUG-IN HTML FOR FIREFOX--&gt;\n            &lt;embed  type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"\n                src=\'&lt;%= GetSource() %&gt;\' align="middle" width="600" height="500" defaultframe="rightFrame"\n                 id="MediaPlayer2" /&gt;\n</code></pre>\n\n<p>And in JavaScript,</p>\n\n<pre><code>    function playVideo() {\n        try{\n                if(-1 != navigator.userAgent.indexOf("MSIE"))\n                {\n                        var obj = document.getElementById("MediaPlayer1");\n                            obj.Play();\n\n                }\n                else\n                {\n                            var player = document.getElementById("MediaPlayer2");\n                            player.controls.play();\n\n                }\n             }  \n        catch(error) {\n            alert(error)\n        } \n\n\n        }\n</code></pre>\n'}, {'answer_id': 1689995, 'author': 'Vonzy', 'author_id': 205189, 'author_profile': 'https://Stackoverflow.com/users/205189', 'pm_score': 2, 'selected': False, 'text': '<p>I have found something that Actually works in both FireFox and IE, on Elizabeth Castro\'s site (thanks to the link on this site) - I have tried all other versions here, but could not make them work in both the browsers</p>\n\n<pre><code>&lt;object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" \n  id="player" width="320" height="260"&gt;\n  &lt;param name="url" \n    value="http://www.sarahsnotecards.com/catalunyalive/fishstore.wmv" /&gt;\n  &lt;param name="src" \n    value="http://www.sarahsnotecards.com/catalunyalive/fishstore.wmv" /&gt;\n  &lt;param name="showcontrols" value="true" /&gt;\n  &lt;param name="autostart" value="true" /&gt;\n  &lt;!--[if !IE]&gt;--&gt;\n  &lt;object type="video/x-ms-wmv" \n    data="http://www.sarahsnotecards.com/catalunyalive/fishstore.wmv" \n    width="320" height="260"&gt;\n    &lt;param name="src" \n      value="http://www.sarahsnotecards.com/catalunyalive/fishstore.wmv" /&gt;\n    &lt;param name="autostart" value="true" /&gt;\n    &lt;param name="controller" value="true" /&gt;\n  &lt;/object&gt;\n  &lt;!--&lt;![endif]--&gt;\n&lt;/object&gt;\n</code></pre>\n\n<p>Check her site out: <a href="http://www.alistapart.com/articles/byebyeembed/" rel="nofollow noreferrer">http://www.alistapart.com/articles/byebyeembed/</a> and the version with the classid in the initial object tag</p>\n'}, {'answer_id': 16966864, 'author': 'Perseus', 'author_id': 2354121, 'author_profile': 'https://Stackoverflow.com/users/2354121', 'pm_score': 2, 'selected': False, 'text': '<p>I found a good article about <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd562847.aspx" rel="nofollow">using the WMP with Firefox</a> on MSDN.</p>\n\n<p>Based on MSDN\'s article and after doing some trials and errors, I found using JavaScript is better than using conditional comments or nested "EMBED/OBJECT" tags.</p>\n\n<p>I made a JS function that generate WMP object based on given arguments:</p>\n\n<pre><code>&lt;script type="text/javascript"&gt;\n    function generateWindowsMediaPlayer(\n        holderId,   // String\n        height,     // Number\n        width,      // Number\n        videoUrl    // String\n        // you can declare more arguments for more flexibility\n        ) {\n        var holder = document.getElementById(holderId);\n\n        var player = \'&lt;object \';\n        player += \'height="\' + height.toString() + \'" \';\n        player += \'width="\' + width.toString() + \'" \';\n\n        videoUrl = encodeURI(videoUrl); // Encode for special characters\n\n        if (navigator.userAgent.indexOf("MSIE") &lt; 0) {\n            // Chrome, Firefox, Opera, Safari\n            //player += \'type="application/x-ms-wmp" \'; //Old Edition\n            player += \'type="video/x-ms-wmp" \'; //New Edition, suggested by MNRSullivan (Read Comments)\n            player += \'data="\' + videoUrl + \'" &gt;\';\n        }\n        else {\n            // Internet Explorer\n            player += \'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" &gt;\';\n            player += \'&lt;param name="url" value="\' + videoUrl + \'" /&gt;\';\n        }\n\n        player += \'&lt;param name="autoStart" value="false" /&gt;\';\n        player += \'&lt;param name="playCount" value="1" /&gt;\';\n        player += \'&lt;/object&gt;\';\n\n        holder.innerHTML = player;\n    }\n&lt;/script&gt;\n</code></pre>\n\n<p>Then I used that function by writing some markups and inline JS like these:</p>\n\n<pre><code>&lt;div id=\'wmpHolder\'&gt;&lt;/div&gt;\n\n&lt;script type="text/javascript"&gt;        \n    window.addEventListener(\'load\', generateWindowsMediaPlayer(\'wmpHolder\', 240, 320, \'http://mysite.com/path/video.ext\'));\n&lt;/script&gt;\n</code></pre>\n\n<p>You can use <strong><em>jQuery.ready</em></strong> instead of <strong><em>window load event</em></strong> to making the codes more backward-compatible and cross-browser.</p>\n\n<p>I tested the codes over IE 9-10, Chrome 27, Firefox 21, Opera 12 and Safari 5, on Windows 7/8.</p>\n'}, {'answer_id': 65250970, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>December 2020 :</p>\n<ul>\n<li>We have now Firefox 83.0 and Chrome 87.0</li>\n<li>Internet Explorer is dead, it has been replaced by the new Chromium-based Edge 87.0</li>\n<li>Silverlight is dead</li>\n<li>Windows XP is dead</li>\n<li>WMV is not a standard : <a href="https://www.w3schools.com/html/html_media.asp" rel="nofollow noreferrer">https://www.w3schools.com/html/html_media.asp</a></li>\n</ul>\n<p>To answer the question :</p>\n<ul>\n<li>You have to convert your WMV file to another format : MP4, WebM or Ogg video.</li>\n<li>Then embed it in your page with <a href="https://www.w3schools.com/html/html5_video.asp" rel="nofollow noreferrer">the HTML 5 <code>&lt;video&gt;</code> element</a>.</li>\n</ul>\n<p>I think this question should be closed.</p>\n'}]
['https://Stackoverflow.com/questions/164', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/91/']