
Migrated from 6 to 7 - javascript stopped working
Hello,
I have two players on this page extremesailingseries.com/live. When I was using version 6 of JWPlayer I used some Javascript to load a local video if the player had an error. This error would occur if a live stream wasn't detect. Since i've moved to version 7 it has suddenly stopped working, initially it was fine. Please see my code below.
<div id='race-graphics-stream'>
<script type='text/javascript'>
jwplayer('race-graphics-stream').setup({
sources: [{
file: 'rtmp://wowza.extremesailingseries.com/live/graphics',
},{
file: 'http://wowza.extremesailingseries.com/live/graphics/playlist.m3u8',
}],
primary: "flash",
//image: 'http://placehold.it/490x276&text=3dvideo',
image: '/images/site/live/video-placeholder-sydney.jpg',
width: "100%",
aspectratio: "16:9",
repeat: "true",
mediaid:
//optional - http://support.jwplayer.com/customer/portal/articles/1406968-using-jw-player-skin
});
jwplayer('race-graphics-stream').on('Error', function(){
jwplayer('race-graphics-stream').load({file:"/images/site/live/error.mp4",image:"/images/site/live/error.jpg"});
jwplayer('race-graphics-stream').play();
theTimeout = setTimeout(function(){
jwplayer('race-graphics-stream').load({file:"rtmp://wowza.extremesailingseries.com/live/graphics",image:"/images/site/live/video-placeholder-sydney.jpg"});
jwplayer('race-graphics-stream').play();
},20000);
});
</script>