0

I was asked to embed a wmv file into a piece of html.

So far so good, googling on how to do it quickly reveals that this is achieved using html tags object and embed.

My problem is that the sample I set up (shown below) is only working in IE. Chrome displays a a gray box with the message "This plugin is not supported", and following the help that shows up turns out chrome does not play NPAPI plug-ins anymore. Firefox shows nothing whatsoever, not even the object frame.

I researched a bit for workarounds to play it on chrome notwithstanding the fact google stopped supporting it sometime on 2015.

Messing with chrome://flags/#enable-npapi looked promising (as suggested here), but I can't find a enable Npapi among my flags.

Anyone knows how to have it working at least in Chrome, Firefox and IE ?

Is it possible to (freely) convert a wvm to Html5 video ?

<Html>
<Head></Head>

<Body>

  <object id="MediaPlayer" width="192" height="190" type="video/x-ms-asf">
    <param name="FileName"value="D:/myVideo.wmv">
    <param name="autostart" value="false">
    <param name="ShowControls" value="true">
    <param name="ShowStatusBar" value="false">
    <param name="ShowDisplay" value="false">
    <embed type="application/x-mplayer2" src="D:/myVideo.wmv"
        width="192" height="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0" />
</object>

</Body>
</Html>
Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
Veverke
  • 9,208
  • 4
  • 51
  • 95
  • 2 possible resources for help: http://stackoverflow.com/questions/23836514/embed-wmv-in-all-chrome-ie-and-firefox /// https://productforums.google.com/forum/#!topic/chrome/e4jDZEegQSo – J. DKYSR Jun 05 '16 at 08:54
  • @J.DKYSR: Thanks, indeed I spotted the 1st link afterwards, although it did not receive much attention/not get much activity. I am trying converting it into Html 5 video. – Veverke Jun 05 '16 at 09:03

1 Answers1

1

There are any number of resources that will convert your wmv to mp4/ogg/other types of cross-browser format, including http://video.online-convert.com/convert-to-mp4, however thats beside the point.

If you want to display the video in html5, you should really use the <video> tag.

An example of this would be

<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  <source src="movie.webm" type="video/webm">
  Your browser does not support the video tag.
</video>
</body>
</html>
Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
  • Yes Rachel, I have just tried it (and was going to post it as an answer) - but did not because this will not work in IE. Will work in chrome, however. In Firefox, still not. By the way I ended up using exactly the same url to convert as you suggest. My answer looked exactly like this :) (the same html 5 video excerpt :) – Veverke Jun 05 '16 at 10:18
  • @Veverke the video tag is supported in ie11+ – Rachel Gallen Jun 05 '16 at 10:19
  • Mine is 11, I am getting "Invalid Souce" inside the video frame. – Veverke Jun 05 '16 at 10:20
  • @Veverke ensure you have the correct (preferably full) path specified for the video – Rachel Gallen Jun 05 '16 at 10:22
  • @Veverke also ensure the video file is not corrupt (i.e. fully converted before you upload it. Just click to play to test it. – Rachel Gallen Jun 05 '16 at 10:24
  • @Veverke i just tested a fiddle in ie11 and it worked fine https://jsfiddle.net/RachGal/0yrn9owh/ – Rachel Gallen Jun 05 '16 at 10:36
  • @Veverke as for firefox, caniuse list that it's supported from vsn 45; i have 43.2 and it ran fine – Rachel Gallen Jun 05 '16 at 10:51
  • Thanks for all the updates Rachel, I am still unable to have it working in IE... I am giving the full path, just like in the working version for chrome. I tried adding video/webm (.webm) format to the MIME Types supported by my IIS, like suggested in other posts, but still no deal. – Veverke Jun 05 '16 at 11:22
  • @veverke if that is the case I would check your doctype to ensure it is in fact html5, it should read !doctype html , then compare your code to my fiddle and see if there are any blatent errors that stand out. Check the doctype first though. Sorry for late reply, was eating! – Rachel Gallen Jun 05 '16 at 11:50
  • @Veverke cheers, It really bugs me when something seemingly simple proves difficult! – Rachel Gallen Jun 05 '16 at 12:09
  • I was indeed missing the doctype that tells it is html5, but... no progress, stayed the same. Will get back to this later. Thanks. – Veverke Jun 05 '16 at 12:35