Jaa


playerObject property

Gets the object that plays media files.

Syntax

JScript
oPlayer = object.playerObject

 

Property values

Type: Object

Player object used to render the element's media.

Remarks

The PLAYER attribute specifies the object that plays media files.

This property provides access to all the properties, methods, and events available on the player object.

Examples

This example plays a video clip with the Windows Media Player control. The video clip begins playing five seconds after the page loads, and continues playing for 20 seconds. The playerObject is used to access the mute property and AboutBox method available on the Windows Media Player control.

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

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>playerObject</TITLE>

<?IMPORT namespace="t" implementation="#default#time2">

<SCRIPT>
function toggleVol()
{
    if (cBox.checked == true) {
        mp.playerObject.mute = false;
    }
    else {
        mp.playerObject.mute = true;
    }
}
</SCRIPT>
</HEAD>

<BODY>
<SPAN STYLE="width:175; position:absolute; left:20px; top:50px; padding:5;
    z-index:-1; border:1pt solid red;">A video clip is played here 5 seconds
    after the page is loaded.</SPAN>

<t:VIDEO ID="mp" STYLE="width:200px; height:200px"
    PLAYER="{22d6f312-b0f6-11d0-94ab-0080c74c7e95}"
    SRC="/workshop/samples/author/behaviors/media/movie.avi" BEGIN="5" DUR="20"/>

<BR><BR>

<INPUT TYPE="BUTTON" VALUE="About Player" onclick="mp.playerObject.AboutBox();">

<INPUT ID="cBox" TYPE=CHECKBOX CHECKED onpropertychange="toggleVol();">
&nbsp;Volume On
</BODY>
</HTML>

See also

animation

audio

img

media

ref

video

Reference

player

Conceptual

Introduction to HTML+TIME