Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Onidle event not working after 2nd trigger?

1 reply [Last post]
Reply

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

Reply

Any help any one?

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options