Veverke
Veverke

Reputation: 11338

Embedding WMV file into Html and making it work in most of the browsers

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>

Upvotes: 0

Views: 3012

Answers (1)

Rachel Gallen
Rachel Gallen

Reputation: 28553

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>

Upvotes: 1

Related Questions