다음을 통해 공유


mediaHeight Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Gets the height of the element.

Syntax

HTML N/A
Scripting [ iHeight = ] object.mediaHeight

Possible Values

iHeight Integer that receives the height of the element, in pixels.

The property is read-only. The property has no default value.

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.

Example

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

<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>

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

Applies To

t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:VIDEO

See Also

Introduction to HTML+TIME, mediaWidth