Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

mediaHeight property

Gets the height of the element.

Syntax

JScript
height = object.mediaHeight

 

Property values

Type: Integer

the height of the element, in pixels.

Remarks

This property represents the actual height of the media file as stored. By default, the media element renders at the height specified in the media file.

Examples

This example uses the mediaHeight property to get the height of the media element.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/mediaheight.htm


<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>mediaHeight Property</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">

<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<t:video id="m1" src="/workshop/samples/author/behaviors/media/shuttle3.wmv" />

<BR><BR>
<SPAN id="mediaHeight1">Media height:</SPAN>

<BR><BR>
<BUTTON id="b1" onclick="mediaHeight1.innerText='Media height: ' + 
    m1.mediaHeight + ' pixels.'">Click here for the height of the media element
    </BUTTON>
</BODY>
</HTML>

See also

animation
audio
img
media
par
ref
seq
video
Reference
mediaWidth
Conceptual
Introduction to HTML+TIME

 

 

Show:
© 2015 Microsoft