IsMuted not working ?

Hello,

I'm trying to implement a mute button on my UI. The documentation clearly states that the IsMuted property should be called on the MediaElement. But I'm receiving "Invalid procedure call or argument" error.

Guess the doc or the CTP is incomplete!

Cheers,
Pascal

NB: Would be great to have the doc in a more standard format with search capabilities !

[413 byte] By [Kickaha4] at [2008-3-5]
# 1

It definately works. Check out the Channel9 Player example. The code that mutes it is:

//--Mute Button
function MuteMouseUp(sender,args)
{
if (muted == "unmuted") {
mediaElement.SetValue("IsMuted", 1);
muted = "muted";
mutedIcon.SetValue("Opacity", 1);
audio1Icon.SetValue("Opacity", 0);
audio2Icon.SetValue("Opacity", 0);
}
else {
mediaElement.SetValue("IsMuted", 0);
muted = "unmuted";
mutedIcon.SetValue("Opacity", 0);
audio1Icon.SetValue("Opacity", 1);
audio2Icon.SetValue("Opacity", 1);
}
}

BryantLikes at 2007-10-9 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) General Discussion...
# 2

Thanks for the quick answer, still learning. The documentation states: (for scripting)

value = object.IsMuted;
object.IsMuted = value;

and not that you have to manage the muted state in another variable and that you have to use a method to get/set the value.

BTW, it would also simply the programming of the client if an event would be raised whenever the mute state is changed on the MediaElement.

Pascal

Kickaha4 at 2007-10-9 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) General Discussion...