Hi,
I'm using the below script so that when the rtmp stream ends that the preview image shows after disconenction, which works on the first and second disconnect, but on the third disconnect the player state is ID'd as idle, but the onidle function doesn't do anything and the player pauses its self...
Is there an alternative way to show the preview image and restart playback after a stream ends (idle state activated)? Or can the below be adjusted to work better?
<script type='text/javascript'>
jwplayer('container').setup({
'flashplayer': 'player.swf',
'image' : 'http://xxxxxxx',
'duration': '9999999',
'file': 'stream.flv',
'provider': 'rtmp',
'bufferlength': '15',
'volume': '0',
'streamer': 'rtmp://xxxxxx/live',
'controlbar': 'none',
'autostart': 'true',
'stretching': 'fill',
'icons': 'true',
'width': '360',
'height': '270'
});
jwplayer('container').onIdle(function() {
jwplayer('container').setup({
'flashplayer': 'player.swf',
'image' : 'http://xxxxxx',
'duration': '9999999',
'file': 'stream.flv',
'provider': 'rtmp',
'bufferlength': '15',
'volume': '0',
'streamer': 'rtmp://xxxxxx/live',
'controlbar': 'none',
'autostart': 'true',
'stretching': 'fill',
'icons': 'true',
'width': '360',
'height': '270'
});
});
</script>
Thanks
Any help any one?