Embedding a wmv file in your web page

Just in case you have to embed a wmv file in your webpage, and there is no need to do it since it’s possibile to play better videos with flash but… just in case you really have to do it… like I have to do it today… here it is the html code

1
2
3
4
5
6
7
8
<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer" WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>

Adjust height, width, ect to match your video settings.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (12 votes, average: 4.33 out of 5)
Loading ... Loading ...
Template monster proudly presents HTML Templates in order to meet its customers\' demands.
These HTML Templates can be easily edited with any HTML editor including the simplest one - Notepad.
They include .html files which makes them available for HTML editing.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 8 comments

  1. Harry

    on September 13, 2007 at 11:42 am

    if only that it so easy; please try with flash; Can you play *.wmv in flash; and how to using in html code; if you can i will buy for you 100….beer…. or not please give me a party….Thanks

  2. Ky Hote

    on January 21, 2008 at 8:08 am

    This seems to work in IE, but not in Mozilla. Do you have anny fixes for that?

  3. petri

    on January 24, 2009 at 1:08 pm

    How about many wmv files in a single player?

  4. Verna

    on April 16, 2009 at 8:20 am

    You forgot to state to place code between tags. I also, have a video in .wmv that I converted to .flv and it looks more clearer in .wmv then flash. What did I do wrong besides developing it in .wmv first?

    Thank You

  5. pallavi

    on September 15, 2009 at 8:39 am

    Very nice.
    Thank you

  6. Yamy

    on May 12, 2011 at 7:26 pm

    Like Ky Hote, for me works perfect in IE but Firefox :-(( Any ideas?

  7. Voynex.com

    on May 26, 2011 at 9:45 pm

    I would suggest to use a cross-browser JavaScript library Voynex Object Embedding ( http://voynex.com/products/object-embedding ) to easily embed windows media audio/video to your HTML documents. With the help of this library you can embed audio, video and other types of objects in one line of code.

  8. Hetal

    on November 28, 2011 at 5:25 pm

    Try following code. It works for me for IE, Mozila, Chrome & Safari.