Embedding Windows Media 9 in a web page
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Embedding Windows Media 9 in a web page

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Roberto
Guest





Posted: Fri Aug 06, 2004 6:45 pm    Post subject: Embedding Windows Media 9 in a web page Reply with quote

I have a page - and want to embed a WM9 file in it. The file has been set to
take up exactly half the XGA screen (512*768). I embed it with the following
code :

<body>
<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
type="application/x-oleobject" width="512" height="768" align="texttop"
standby="Loading Microsoft Windows Media Player components..."
id="MediaPlayer">
<param name="FileName" value="test.wmv">
<param name="TransparentAtStart" value="true">
<param name="AutoStart" value="true">
<param name="AnimationatStart" value="false">
<param name="ShowControls" value="false">
<param name="autoSize" value="false">
<param name="loop" value="true">
<embed
src="../../overlay/images/test.wmv" width="512" height="768"
autostart=0 align="texttop" type="application/x-mplayer2"
pluginspage=
"http://www.microsoft.com/Windows/MediaPlayer/"
transparentatstart=0
animationatstart=0
showcontrols=0
autosize=0
displaysize=0></embed> </object></body>

I then want to display the page, full screen, in Internet Explorer. But the
embedded video has a border of maybe 20 pixels to the left and top that
pushes the image off the screen (it is sezed to fit exactly).

Is there a way that I can get the video to embed tight into the top left
hand corner? or is this border just a "feature".

Many thanks for any advice.
Roberto.

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Sat Aug 07, 2004 6:24 pm    Post subject: Re: Embedding Windows Media 9 in a web page Reply with quote

Sure thing - There's no 'feature' or component of media player
involved in this, it is just basic CSS : Stick the following in your
pages head tags (which you've omitted to supply here) :

<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
}
-->
</style>

By default, IE has borders (technically, margins) round the edge of
the page, they correspond to the 'border' you're takling about. Here,
we're switching them off using a style rule on the body element.
Technically, 'px' is not required when you specify zero for a CSS
value, but I left them in so you can see what it's doing. You could
also have specified

body {
margin: 0px 10px 5px 12px;
}

This would give you (clockwise from top) margins of 0, 10 (right), 5
(bottom) and 12 (left) pixels on the body element (or any element you
chose to use).

Cheers - Neil

On Fri, 6 Aug 2004 07:45:02 -0700, "Roberto"
<Roberto@discussions.microsoft.com> wrote:

Quote:
I have a page - and want to embed a WM9 file in it. The file has been set to
take up exactly half the XGA screen (512*768). I embed it with the following
code :

body
object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
type="application/x-oleobject" width="512" height="768" align="texttop"
standby="Loading Microsoft Windows Media Player components..."
id="MediaPlayer"
param name="FileName" value="test.wmv"
param name="TransparentAtStart" value="true"
param name="AutoStart" value="true"
param name="AnimationatStart" value="false"
param name="ShowControls" value="false"
param name="autoSize" value="false"
param name="loop" value="true"
embed
src="../../overlay/images/test.wmv" width="512" height="768"
autostart=0 align="texttop" type="application/x-mplayer2"
pluginspage=
"http://www.microsoft.com/Windows/MediaPlayer/"
transparentatstart=0
animationatstart=0
showcontrols=0
autosize=0
displaysize=0></embed> </object></body

I then want to display the page, full screen, in Internet Explorer. But the
embedded video has a border of maybe 20 pixels to the left and top that
pushes the image off the screen (it is sezed to fit exactly).

Is there a way that I can get the video to embed tight into the top left
hand corner? or is this border just a "feature".

Many thanks for any advice.
Roberto.
Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB