skip to next playlist item not working!!!
Posted: 16 Feb 2011 10:23
Hi Guys
I have a problem where I have added 2 playlist items streaming from a UDP Multicast server and I want to change from one channel to another, but it wont work...
Below is the code:
I have a problem where I have added 2 playlist items streaming from a UDP Multicast server and I want to change from one channel to another, but it wont work...
Below is the code:
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-vlc.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/vlc-object.js"></script>
<script type='text/javascript'>
window.onload = function(){
var vlc0 = document.getElementById('vlc0');
vlc0.playlist.playItem( vlc0.playlist.add('udp://@239.100.0.4:4422') );
var vlc1 = document.getElementById('vlc1');
vlc1.playlist.playItem( vlc1.playlist.add('udp://@239.107.1.4:4422') );
};
</script>
<body>
<embed id="vlc" type="application/x-vlc-plugin"
autoplay="yes"
width="547"
height="305"
target="udp://@239.100.0.4:4422">
</embed>
<script type="text/javascript">
function mute(){
vlc.audio.toggleMute();
}
function pause(){
vlc.playlist.togglePause();
}
function stop() {
vlc.playlist.stop();
}
function change(){
vlc.playlist.playItem(vlc1);
}
</script>
<input type="button" onClick='pause();' value="Play/Pause" />
<input type="button" onClick='mute();' value="Mute" />
<input type="button" onClick='stop();' value="Stop" />
<input type="button" onClick="change();" value="channel up" />
</body>
</html>