I’m using the flash FLV player component. The video auto plays and needs to be muted to start off with, then viewers can toggle between sound on or off.
videoPlayer.volume = 0;
var isMute:Boolean = true;
videoPlayer.addEventListener(MouseEvent.CLICK, muteClickHandler);
function muteClickHandler(e:MouseEvent) {
if(isMute) {
videoPlayer.volume=1;
isMute = false;
} else if (!isMute) {
videoPlayer.volume=0;
isMute = true;
}
}
But the icon to show sound on/off isn’t showing up correctly. For example, when the volume=0 in the very beginning, the icon show that the sound is on. Also, even if the volume is 0, when you click the pause button, the icon changes to sound on.
Is there anything I can do to fix this issue?
you need to handle by your own code to change the mute button icon.
i think there is no any API for that.