Media Streaming
How can I embedding Windows Media Files ?
Windows Media files tend to be of low size and high quality, You should embed
the video in your browser with proper coding to avoid the problems faces in
browsers besides IE users.
To embed a file simply means that you put the media player right into the web
page itself. However, the end user must have Windows Media Player installed
on their computer for this to work.
OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=276 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="mymediafilename.wmv">
<PARAM NAME="ShowControls" VALUE="true">
<param NAME="ShowStatusBar" value="true">
<PARAM NAME="ShowDisplay" VALUE="false">
<PARAM NAME="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="mymediafilename.wmv"
NAME="MediaPlayer"
WIDTH=320 HEIGHT=276 ShowControls="1" ShowStatusBar="1"
ShowDisplay="1" autostart="0">
</EMBED>
</OBJECT>
The <object> tag is needed for use with Internet Explorer on Windows.
The <embed> tag is to reach the maximum browser capability due to the
fact that it is used by most all other browsers (ie. Firefox, etc.)
Look at the code
- For both the <object> tag and the <embed> tag use true (yes) or false (no).
- <object> Tag Parameters - When setting the <object> tag parameters, be sure to always enclose parameter
values in double quotation marks.
- classid="..." - This tells the browser what filetype will be loaded,
and what application should handle it. This should be copied completely.
width and height - When setting the width and height, be sure you set them for
at least the width and height of the file itself.
- codebase="..." - This tells the browser where to find QuickTime movie
player if it is not already installed. If it is not, it will install automatically
if the user allows it to.
- param name="src" value="..." - This is the URL to your movie
file.
- param name="autoplay" value="..."- If set to "true",
the video clip will begin playing as soon as it completes downloading. The default
is set by the user in the settings.
- param name="controller" value="..."- If set to "true",
the movie controllers will be visible. If this is omitted, the default will
be set to "true".
- <embed> Tag Parameters - QuickTime really only requires the <embed> but in order to reach Windows
IE users also, the <object> is included. The <embed> tag basically
is a duplicate of the <object> tag with few differences.
All the parameters: embed src="....mov" width="..." height="..."
play="..." loop="..." quality="high", are the
same.
pluginspage="..." - This is the <embed> tag attribute that tells
the browser where to find QuickTime movie player if it is not already installed.
If it is not, it will install automatically if the user allows it to.