Hi,
Basically I'm looking for a way to set the preview image to show on the onidle event.
I'm using the below code for a live rtmp video stream, control bar and icons are hidden so its literally just showing a live video via jwplayer.
In addition to this the player will contiuously loop when the rtmp stream ends as it will be taken over by a new source within seconds of the old one ending most of the time. This means users dont have to start the player again to continue watching.
However when the stream does go offline it doesn't then show the preview image that showed at the beginning or if the stream wasn't live so the player is blank.
Can anybody help?
Thanks.
<script type='text/javascript'>
jwplayer('container').setup({
'flashplayer': 'player.swf',
'duration': '9999999',
'file': 'stream.flv',
'provider': 'rtmp',
'bufferlength': '30',
'volume': '0',
'streamer': 'rtmp://xxxxxx/live',
'controlbar': 'none',
'autostart': 'true',
'image': 'http://xxxxxx',
'icons': 'false',
'stretching': 'fill',
'width': '400',
'height': '300'
});
jwplayer("container").onIdle(function() {
jwplayer().play();
});
</script>