Hello! I'm having trouble with a small project I have to rig up. I'm using the VLC plugin to stream three webcam feeds into one player, switching between the feeds by using three buttons and an onclick event (relevant code below, # signs hiding IP addresses). This seems to work as I intend in Firefox 17, except that if you click on the cam1 button the feed cycles to cam2 after a few (30ish) seconds, then again to cam3 where the feed settles. The same with cam2. Cam3 stays on the correct feed. Obviously my javascript is looping through the code in sequence, but I really don't understand why (I'm very new to web coding in general, and java in particular). Can anyone see how to correct the posted code to stop this? I appreciate any comments or suggestions about the code in general, but being this is pretty much a one of project I'm less interested in getting better than I am at solving this one problem. Thanks for any help!

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
<HTML>
<HEAD>
<TITLE></TITLE>



</HEAD>
<BODY>



<embed  type="application/x-vlc-plugin"
	autoplay="no"
	loop="no"
	id="vlc"
	pluginspage="http://www.videolan.org" 
	version="VideoLAN.VLCPlugin.2"
	width="320" 
	height="240"
	> 
</embed>

<br />
<button href="javascript:;" onclick="Cam1()">Webcam 1</button>
<button href="javascript:;" onclick="Cam2()">Webcam 2</button>
<button href="javascript:;" onclick="Cam3()">Webcam 3</button>

<script language="javascript">

var options = new Array ("aspect-ratio=4:3", "--repeat");
var Video1 = vlc.playlist.add("rtsp://130.###.##.###:8081/", "MRL1", options);
var Video2 = vlc.playlist.add("rtsp://130.###.##.###:8082/", "MRL2", options);
var Video3 = vlc.playlist.add("rtsp://130.###.##.###:8084/", "MRL3", options);

function Cam1() {
vlc.playlist.stop();
vlc.playlist.playItem(Video1);
}

function Cam2() {
vlc.playlist.stop();
vlc.playlist.playItem(Video2);
}

function Cam3() {
vlc.playlist.stop();
vlc.playlist.playItem(Video3);
}

</script>

</BODY>
</HTML>