The problem is that the method toggleMute appears to be global. I reference one object, toggleMute, and both audios go away.
I see there is a set_volume method, but I cannot get that to work.
Here is the web page code for the 2 videos I have:
Code: Select all
<HTML>
<head>
<title>VLC plugin test</title>
<SCRIPT language="JavaScript">
function play()
{
document.v1.playlistClear();
var options=["udp://@239.1.1.128:1234"];
document.v1.addTarget("udp://@239.1.1.128:1234", options, 2, 0); // replace entry 0
document.v1.play();
document.v2.playlistClear();
var options2=["udp://@239.3.1.1:1234"];
document.v2.addTarget("udp://@239.3.1.1:1234", options2, 2, 0); // replace entry 0
document.v2.play();
}
function mute()
{
//document.v1.set_volume(200);
//document.v2.set_volume(0);
}
</SCRIPT>
</head>
<BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onload="play()">
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="320" height="240" id="v1" events="True">
<param name="ShowDisplay" value="True"/>
<param name="AutoPlay" value="True"/>
</OBJECT>
<br><br>
<BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onload="play()">
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="320" height="240" id="v2" events="True">
<param name="ShowDisplay" value="True"/>
<param name="AutoPlay" value="True"/>
</OBJECT>
<br>
<a href="javascript:play();">play-1</a>
<a href="javascript:mute();">mute-1</a>
</BODY>
</HTML>