Re: need to refresh jPlayer

323 views
Skip to first unread message

Mark Panaghiston

unread,
May 2, 2013, 2:16:33 PM5/2/13
to jpl...@googlegroups.com
Is this a trick question?

Take a look at the stream player demo:
http://www.jplayer.org/latest/demo-08/



On Wednesday, 1 May 2013 23:56:42 UTC+1, blackothica wrote:
Hi,

We are using jPlayer to stream from shoutcast there but there is a noticeable delay which we know is down to the buffering on the shoutcast server. The problem its causing is in updating the jPlayer controls i.e. when the user hits stop then start again the song continue to play even when we have changed the source song. The only way we have found around it is to refresh the page (F5). what we need is some way to simulate this refresh inside the Stop button click so that when the user hits play again they get the latest song content that is being streamed. We'ver tried placing various calls inside an onclick in the jPlayers 'stop' button like window.refresh(), document.refresh() but obviously HTML5 does use these methods.

Any ideas if there is a .refresh method or similar?  - We're using HTML5, in Firefox and jPlayer2.3.0 and jQuery Mobile.

thanks in advance ...

James Graham

unread,
May 6, 2013, 11:45:49 AM5/6/13
to jpl...@googlegroups.com
I use the load method.
  var Player = document.getElementById('player'); 
Player.src = songtitle;
Player.load();
Player.play();

James Graham
Software Specialties

On May 1, 2013, at 3:56 PM, blackothica wrote:

Hi,

We are using jPlayer to stream from shoutcast there but there is a noticeable delay which we know is down to the buffering on the shoutcast server. The problem its causing is in updating the jPlayer controls i.e. when the user hits stop then start again the song continue to play even when we have changed the source song. The only way we have found around it is to refresh the page (F5). what we need is some way to simulate this refresh inside the Stop button click so that when the user hits play again they get the latest song content that is being streamed. We'ver tried placing various calls inside an onclick in the jPlayers 'stop' button like window.refresh(), document.refresh() but obviously HTML5 does use these methods.

Any ideas if there is a .refresh method or similar?  - We're using HTML5, in Firefox and jPlayer2.3.0 and jQuery Mobile.

thanks in advance ...

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jplayer+u...@googlegroups.com.
To post to this group, send email to jpl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jplayer?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Graham



Mark Panaghiston

unread,
May 7, 2013, 1:00:31 PM5/7/13
to jpl...@googlegroups.com
That is pure HTML and JavaScript Moose.

The demo given uses clear media. On the pause event, it sets SRC to "about:blank" and then does the media.load().
Then when you play it again, an error occurs, which causes the setMedia command which sets the SRC back to the url and does the load() and play().
I explain that in the demo text.
Reply all
Reply to author
Forward
0 new messages