Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

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>

1 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi, there.

My name is Alex and I am one of the Support Engineers at JW Player. I will be more than happy to assist you with your questions.

In looking over your code, one thing does pop out to me in your method. The ‘error’ in .on(“error”) may have to be all lowercase. Please try that and let me know if the issue is still occurring.

Thank you.

This question has received the maximum number of answers.