Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to embed WMV files in my html file

Tags:

html

embed

wmv

i have made some demo movies in WMV format that i want to embed in my html page. I've found some code to do that, but one thing annoys me: it shows a black front in stead of a picture of the first frame. And i can ofcourse put some descriptive text around the frames/movies, but it isn;t such a nice sight: all black squares with a play button beneath it. What do i have to do to show a (first) frame of the movie?

This is my code:

classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=6,4,7,1112"> 
<param name="filename" value="http://www.ladieda.com/mymovie.wmv"> 
<param name="autoStart" value="false"> 
<param name="showControls" value="true"> 
<param name="AllowChangeDisplaySize" value="true"> 
<param name="ClickToPlay" value="true"> 
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="http://www.ladieda.com/mymovie.wmv" AutoStart="false" ></embed>
</object>

Michel

Ps tried it in IE8 and FF3.6, both showed up black.

like image 381
Michel Avatar asked Mar 29 '10 14:03

Michel


People also ask

How do I embed a WMV file in HTML?

To embed WMV videos in a web page you have to use an object/embed tag that calls the windows media player plugin (if it is installed - ie it will not work in platforms where the plugin is not available like iOS).

Is WMV supported by HTML?

A: WMV is sealed format of Microsoft, so its support is limited in the current version of EasyHTML5Video.

Can browser play WMV?

Learn more. Google Chrome will not automatically play WMV files as it requires Windows Media Player and it does not have a default plug-in. You need to install a video player to watch or play web videos in your PC.

What program plays WMV files?

WMV files can be opened using various media file players. If you are a Windows user, you can play these files with the bundled Windows Media Player and Microsoft Movies & TV players. You can also open WMV files in Windows, MacOS, and Linux using VideoStudio.


1 Answers

My example works.

<object id='mediaPlayer' width="320" height="285" 
      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'>
      <param name='fileName' value="http://www.ladieda.com/mymovie.wmv">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='true'>
      <param name='autoStart' value="false">
      <param name='showControls' value="true">
      <param name='loop' value="true">
      <embed type='application/x-mplayer2'
        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
        bgcolor='darkblue' showcontrols="true" showtracker='-1' 
        showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
        src="http://www.ladieda.com/mymovie.wmv" autostart="true" designtimesp='5311' loop="true">
      </embed>
      </object>

Your example was modified to work:

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=6,4,7,1112"> 
<param name="fileName" value="http://www.ladieda.com/mymovie.wmv"> 
<param name="autoStart" value="false"> 
<param name="showControls" value="true"> 
<param name="AllowChangeDisplaySize" value="true"> 
<param name="ClickToPlay" value="true"> 
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.ladieda.com/mymovie.wmv" autoStart="false" ></embed>
</object>

And yes, it works both on Firefox 3.6 and IE8 (I tested it myself).

like image 185
Buhake Sindi Avatar answered Jan 03 '23 15:01

Buhake Sindi