Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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="DMusic"
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.

↑ Back to the top


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.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

Steps to reproduce the problem

  1. Click Start, click Run, type notepad, and then click OK.
  2. Paste the following code in Notepad:
    <HTML XMLNS:t ="urn:schemas-microsoft-com:time">
    <HEAD>
    <LINK REL="stylesheet" HREF="http://msdn.microsoft.com/workshop/samples/samples.css" TYPE="text/css">
    <?IMPORT namespace="t" implementation="#default#time2">
    <STYLE>
    .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;}
    </STYLE>
    
    
    	<TITLE>Playing One Primary Segment On Top of Another (BOUNDARY = immediate)</TITLE>
    </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>
    
    <!-- This t:AUDIO time element can be activated after the music content is finished downloading -->
    <t:AUDIO ID="oSegment1" SEGMENTTYPE="primary" SRC="http://msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/DMusic/Runtime/basicBeat.sgt" PLAYER="dmusic" BEGIN="oButton.click"
    onmediacomplete="oButton.innerText = 'Start Music';oButton.disabled = false;"
    />
    
    <t:AUDIO ID="oSegment2" SEGMENTTYPE="primary" SRC="http://msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/DMusic/Runtime/scale.sgt" PLAYER="dmusic" BOUNDARY="immediate" BEGIN="oSegment1.begin+1"/>
    
    <BUTTON DISABLED ID="oButton">Loading Music</BUTTON>
    
    
    <!-- All the following code is used merely to demonstrate the progress of the 
    DirectMusic content. -->
    
    <!-- This DIV is the red bar that moves across the first table and shows the 
    progress of the first two measures of music. -->
    <DIV DUR="6.8" BEGIN="oSegment1.begin" CLASS="time" style="width:4px;height:70px;background-color:red;position:absolute;top:202px;left:5px;z-index:1;">
    <t:ANIMATE ID="oAnim1" BEGIN="oSegment1.begin" DUR="6.8" ATTRIBUTENAME="left" FROM="5px" TO="380px"/>
    </DIV>
    <!-- This DIV is the red bar that moves across the second table and shows the 
    progress of the last beat and the grid of music. -->
    <DIV DUR="1.3" BEGIN="oAnim1.end" CLASS="time" style="width:4px;height:70px;background-color:red;position:absolute;top:285px;left:5px;z-index:1;">
    <t:ANIMATE ID="oAnim2" BEGIN="oAnim1.end" DUR="1.3" ATTRIBUTENAME="left" FROM="5px" TO="70px"/>
    </DIV>
    
    <!-- The following tables are used to show the notes, beats, and measures of the music. -->
    <TABLE  cellpadding="0" style="border-collapse: collapse;position:absolute;top:207px;left:10px;z-index:0;" cellspacing="0">
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear "></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear  marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    </TR>
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear marked"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear marked"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    </TR>
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2 marked2"></TD>
    </TR>
    
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear "></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2 marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack2"></TD>
    </TR>
    
    </TABLE>
    <BR><BR>
    
    <TABLE  cellpadding="0" style="border-collapse: collapse;position:absolute;top:290px;left:10px;z-index:0;" cellspacing="0">
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear" STYLE="border-right:1px solid blue"></TD>
    </TR>
    
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear" STYLE="border-right:1px solid blue"></TD>
    </TR>
    
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear "></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1"></TD>
    <TD CLASS="clear" STYLE="border-right:1px solid blue"></TD>
    </TR>
    
    <TR>
    <TD STYLE="border-left:4px solid black" CLASS="clear "></TD>
    <TD CLASS="clear marked2"></TD>
    <TD CLASS="clear"></TD>
    <TD CLASS="whiteRightBlack1 marked2"></TD>
    <TD CLASS="clear" STYLE="border-right:1px solid blue"></TD>
    </TR>
    </TABLE>
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    <p class="viewsource">To view the source code, right-click this page and choose View Source from the shortcut menu that appears.</p>
    <!-- Copyright -->
    <A class="copyright" HREF="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top"> 
    &copy; 2004 Microsoft Corporation. All rights reserved. Terms of use.</A>
    
    </BODY>
    </HTML>
    
  3. On the File menu, click Save.
  4. Type test.htm in the File name box, and then click Save.
  5. Close Notepad.
  6. Double-click the Test.htm file to open the file in Microsoft Internet Explorer.
The Loading Music button on the Web page is not available, and you cannot play music.

↑ Back to the top


References

For more information, visit the following MSDN Web site:

↑ Back to the top


Keywords: kbapi, kbbrowsing, kbtshoot, kbprogramming, kbprb, KB821986

↑ Back to the top

Article Info
Article ID : 821986
Revision : 5
Created on : 5/24/2007
Published on : 5/24/2007
Exists online : False
Views : 360