Partilhar via


speed Property

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

Gets the playback speed of an element at run time, which includes the cascading effect of the speed set for the parent time container.

Syntax

[ fcurrSpeed = ] currTimeState.speed

Possible Values

fcurrSpeed Floating-point that receives the runtime speed of an element.

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

Remarks

The value of this read-only property reflects the speed settings inherited by the element from its parent time container. For example, if the speed property of the parent time container for an element is set to 0.5 and the speed property of the element is set to 0.5, the element plays back at 25 percent of its usual playback speed. In other words, the parent plays at 50 percent speed, and the child plays at 50 percent of the parent speed, yielding a 25 percent playback speed for the child.

Example

The following example accesses the speed property of an element at run time. Click the buttons to see the difference between the speed of the video element and the value of the speed property exposed by the currTimeState object. In this case, the speed value is the product of speed settings for the element and its parent.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>speed Property</TITLE>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY>

<t:PAR id="p1" SPEED="2" >
<t:VIDEO id="v1" BEGIN="1" style="position:absolute; top:80px; left:20px;
    height:100px;"
    src="shuttle3.wmv"
    speed="1.5"
/>
</t:PAR> 

<BUTTON class="time" style="position:absolute;top:200px" repeatCount="indefinite" 
    onclick="alert('Run time speed: ' +  v1.currTimeState.speed);">
    Run time speed</BUTTON>
<BUTTON class="time" style="position:absolute;top:200px;left:150px" 
repeatCount="indefinite" onclick="alert('Video element speed: ' + v1.speed);">
Video element speed</BUTTON>

</BODY>
</HTML>

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

Applies To

currTimeState

See Also

Introduction to HTML+TIME