Syed Jahanzaib Personal Blog to Share Knowledge !

April 16, 2012

October 4, 2011

Howto Embed Media File in HTML Page

Filed under: Microsoft Related — Tags: , , , , , — Syed Jahanzaib / Pinochio~:) @ 2:19 PM

You can stream any local media file / live stream via Firefox Browser.
For example you can create a list of Video Files and link it on your web site, So when user click on the video link, instead of downloading, it will play directly via browser. This is just an idea, you can create exciting web pages with this logic. It is highly recommended to install VLC media player in Full Installation mode at Client.

 

To play Video via VLC plugin, Use the following code.

<embed type="application/x-vlc-plugin" name="VLC" autoplay="yes" loop="yes" volume="100" width="640" height="480" target="d:\1.flv">


(Replace 1.flv with your media file)

To play Video via Windows Media Player – WMP  plugin, Use the following code.

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640"

height="480"codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="d:\1.flv">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="true">
<param name="InvokeURLs" value="false">
<embed src="d:\1.flv" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1"
showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
width="480" height="360"></embed>
</object>

(Replace 1.flv with your media file)

RESULT

Embeded File Played Via Firefox Browser

Embeded File Played Via Firefox Browser

%d bloggers like this: