player property

Sets or gets the object used to render the media associated with this element.


object.player = sIDsID = object.player

Property values

Type: String

One of the values in the Property Values section.


This property works only with media-playing objects that support HTML+TIME (Timed Interactive Multimedia Extensions). This property cannot be modified in script after the onload event fires on the document body.

As of Microsoft Internet Explorer 6, authors can use HTML+TIME with the mediaBar behavior to play timed content in the Media Bar. The Media Bar content proxy player is provided to ensure that the activeTime of an HTML+TIME timeline is coordinated with the activeTime that is used by the Media Bar player control. To coordinate media playing in the Media Bar with an HTML+TIME timeline playing in the Media Bar content area, specify the class identifier of the Media Bar content proxy player in the PLAYER attribute of the t:MEDIA element. "{52ca3bcf-3b9b-419e-a3d6-5d28c0b0b50c}" is the content proxy class identifier.

Note The DirectMusic HTML control and the DirectMusic TIME control are turned off by default in Windows 2000 Service Pack 4 (SP4), Windows XP Service Pack 1 (SP1), Windows Server 2003, and later. Therefore, the DirectMusic API should no longer be referenced by this property.


The following example applies only to Internet Explorer 6 and later. It demonstrates media playing in the Media Bar, synchronized with an HTML+TIME timeline playing in the Media Bar content area, with {52ca3bcf-3b9b-419e-a3d6-5d28c0b0b50c} specified in the PLAYER attribute of the t:MEDIA element.

Code example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
  .time {behavior: url(#default#time2);}
    <?IMPORT namespace="t" implementation="#default#time2">
    <LINK REL="stylesheet" HREF="/workshop/samples/samples.css" TYPE="text/css">
<BODY id="oBody">

<t:PAR syncBehavior="locked">
    <t:MEDIA id="m1" src="/workshop/samples/author/behaviors/media/j0082200.mid"
        syncMaster="true" syncBehavior="locked" begin="1"  />
    <t:ANIMATEMOTION id="a1" begin="m1.begin" dur="9" targetElement="oDiv" 
        path="M 0 0 L 100 300" fill="freeze"/>
    <t:SEQ style="font-size:18pt;color:#ff0000" syncBehavior="locked" 
        begin="m1.begin" fill="freeze">
    <DIV class="time" dur="1.5">Add Some Text</DIV>
        <DIV class="time" dur="1.5">Or HTML</DIV>
            <DIV class="time" dur="2">To Accompany</DIV>
                <DIV class="time" dur="2">Media Playing in the Media Bar</DIV>
    <DIV id="oDiv" class="time"     
        top:70;left:10;font-size:18;border-style:solid" >
        Falling DIV</DIV>

See also










Introduction to HTML+TIME