Partager via


mute property

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

Syntax

JScript
val = object.mute

 

Property values

Type: Boolean

One of the values in the Property Values section.

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.

Examples

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

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

<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>

See also

animation

audio

img

media

par

ref

seq

time2

video

Reference

volume

Conceptual

Introduction to HTML+TIME