Freigeben über


MUTE Attribute | mute Property

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

Sets or gets a value that indicates whether the audio is turned on or off.

Syntax

HTML <ELEMENT MUTE ... >
Scripting [ bMute = ] object.mute

Possible Values

bMute Boolean that specifies or receives one of the following values.
false
Default. Sound is turned on.
true
Sound is turned off.

The property is read/write. The property has a default value of false.

Remarks

You can mute all the timed audio elements in a time container, such as a par or seq, by setting the mute property on that container to true. You can mute the sound for all timed audio elements on a page by setting the mute property on the body element to true.

The mute property does not affect the global system mute available on the sound mixer.

Example

The following example shows how to select the volume of the sound effect, or to mute the volume.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>volume / mute Property</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">

<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>

<BODY>

<t:media id="m1" begin="indefinite;"
    src="/workshop/samples/author/behaviors/media/shuttle3.wmv"
    onmediacomplete="Timer2.beginElement();" fill="remove"/>

<BR><BR>
<BUTTON id="b0" onclick="m1.beginElement();">Start</BUTTON>
<BUTTON id="b3" onclick="m1.endElement();">Stop</BUTTON>
<BR><BR>

<B>Volume control:</B>&nbsp;
<input type="radio" name="i1" onpropertychange="m1.mute='true';">Mute
<input type="radio" name="i1"
    onpropertychange="m1.mute='false';m1.volume=25;">25% Volume
<input type="radio" name="i1"
    onpropertychange="m1.mute='false';m1.volume=50;" checked>50% Volume
<input type="radio" name="i1"
    onpropertychange="m1.mute='false';m1.volume=75;">75% Volume
<input type="radio" name="i1"
    onpropertychange="m1.mute='false';m1.volume=100;">100% Volume

</BODY>
</HTML>

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

Applies To

t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, time2, t:VIDEO

See Also

Introduction to HTML+TIME, volume