Microsoft KB Archive/821986

= Embedded music may not play on Web pages that use the DirectMusic API to play music =

Article ID: 821986

Article Last Modified on 5/24/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise x64 Edition
 * Microsoft Windows Server 2003, 64-Bit Datacenter Edition
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Web Edition
 * Microsoft Windows XP Embedded
 * Microsoft Windows 2000 Service Pack 4

-





SYMPTOMS
Some Web pages that use the DirectMusic application programming interface (API) to play music may not work as expected, and the embedded music on these pages may not play. If you use the following code, you cannot play any embedded music: player=&quot;DMusic&quot; If DirectMusic is installed on the computer, you may receive a script error and a mediaError event when you call the id.playerObject.isDirectMusicInstalled method. If you do not have DirectMusic on your computer, the id.playerObject.isDirectMusicInstalled method correctly returns false, and the mediaError event does not occur.



CAUSE
By default, both the DirectMusic HTML control and the DirectMusic TIME control are turned off in Microsoft Windows 2000 Service Pack 4 (SP4), Microsoft Windows XP SP1, and Microsoft Windows Server 2003.



STATUS
This behavior is by design.



Steps to reproduce the problem
 Click Start, click Run, type notepad, and then click OK.  Paste the following code in Notepad:    <?IMPORT namespace=&quot;t&quot; implementation=&quot;#default#time2&quot;>  .time {behavior: url(#default#time2);} .clear {background-color:white;border-left:1px solid blue;border-top:1px solid black;border-bottom:1px solid black;height:15px;} .whiteRightBlack2 {background-color:white;border-left:1px solid blue;border-right:4px solid black;border-top:1px solid black;border-bottom:1px solid black;height:15px;} .whiteRightBlack1 {background-color:white;border-left:1px solid blue;border-right:2px solid black;border-top:1px solid black;border-bottom:1px solid black;height:15px;} .marked {background-color:blue;} .marked2 {background-color:green;} 

Playing One Primary Segment On Top of Another (BOUNDARY = immediate) </HEAD>

<BODY> <H2>Playing One Primary Segment On Top of Another (BOUNDARY = immediate)</H2> <P>The first <B>t:AUDIO</B> element (segment) plays a steady drum beat. Another segment is started on the time line one second after the first. This segment consists of a piano playing a few notes up and down. The second segment lasts for two measures.</P>

<t:AUDIO ID=&quot;oSegment1&quot; SEGMENTTYPE=&quot;primary&quot; SRC=&quot;http://msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/DMusic/Runtime/basicBeat.sgt&quot; PLAYER=&quot;dmusic&quot; BEGIN=&quot;oButton.click&quot; onmediacomplete=&quot;oButton.innerText = 'Start Music';oButton.disabled = false;&quot; />

<t:AUDIO ID=&quot;oSegment2&quot; SEGMENTTYPE=&quot;primary&quot; SRC=&quot;http://msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/DMusic/Runtime/scale.sgt&quot; PLAYER=&quot;dmusic&quot; BOUNDARY=&quot;immediate&quot; BEGIN=&quot;oSegment1.begin+1&quot;/>

<BUTTON DISABLED ID=&quot;oButton&quot;>Loading Music</BUTTON>

<DIV DUR=&quot;6.8&quot; BEGIN=&quot;oSegment1.begin&quot; CLASS=&quot;time&quot; style=&quot;width:4px;height:70px;background-color:red;position:absolute;top:202px;left:5px;z-index:1;&quot;> <t:ANIMATE ID=&quot;oAnim1&quot; BEGIN=&quot;oSegment1.begin&quot; DUR=&quot;6.8&quot; ATTRIBUTENAME=&quot;left&quot; FROM=&quot;5px&quot; TO=&quot;380px&quot;/> </DIV>

<DIV DUR=&quot;1.3&quot; BEGIN=&quot;oAnim1.end&quot; CLASS=&quot;time&quot; style=&quot;width:4px;height:70px;background-color:red;position:absolute;top:285px;left:5px;z-index:1;&quot;> <t:ANIMATE ID=&quot;oAnim2&quot; BEGIN=&quot;oAnim1.end&quot; DUR=&quot;1.3&quot; ATTRIBUTENAME=&quot;left&quot; FROM=&quot;5px&quot; TO=&quot;70px&quot;/> </DIV>

<BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <p class=&quot;viewsource&quot;>To view the source code, right-click this page and choose View Source from the shortcut menu that appears.

<A class=&quot;copyright&quot; HREF=&quot;http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm&quot; TARGET=&quot;_top&quot;> &copy; 2004 Microsoft Corporation. All rights reserved. Terms of use.</A>

</BODY> </HTML> </li> On the File menu, click Save.</li> Type test.htm in the File name box, and then click Save.</li> Close Notepad.</li> Double-click the Test.htm file to open the file in Microsoft Internet Explorer.</li></ol>

The Loading Music button on the Web page is not available, and you cannot play music.

<div class="references_section">