
Help changing video source in java script
I am working to convert our code to support the JW Player 6 (from v5). I am having trouble getting the java script to change video source. The function is triggered when the user clicks a button on the browser.
I'm pretty sure it's in this line:
bc.. .
var toplay= "file: 'http://<%=node%>.<%=dc %>.OurWowzaServer.net:1935/<%=PubPoint %>' + '/smil:' + Channel + '.smil/playlist.m3u8'";
but not sure exactly how to fix. Can anyone advise please? thank you
bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '720',
'height': '410',
'controlbar': 'over',
'autostart': 'true',
'live': 'true',
'file': 'http://<%=node%>.<%=dc %>.OurWowzaServer.net:1935/<%=PubPoint %>/smil:<%=Feed %>.smil/playlist.m3u8'
});
function ChangeVideo(Channel) {
var element = document.getElementById('mediaplayer');
var toplay= "file: 'http://<%=node%>.<%=dc %>.OurWowzaServer.net:1935/<%=PubPoint %>' + '/smil:' + Channel + '.smil/playlist.m3u8'";
jwplayer(element).load(toplay);
jwplayer(element).play();
}
</script>