1. var stream = {
  2. title: "ABC Jazz",
  3. mp3: "http://listen.radionomy.com/abc-jazz"
  4. },
  5. ready = false;
  6. $("#jquery_jplayer_1").jPlayer({
  7. ready: function (event) {
  8. ready = true;
  9. $(this).jPlayer("setMedia", stream);
  10. },
  11. pause: function() {
  12. $(this).jPlayer("clearMedia");
  13. },
  14. error: function(event) {
  15. if(ready && event.jPlayer.error.type === $.jPlayer.error.URL_NOT_SET) {
  16. // Setup the media stream again and play it.
  17. $(this).jPlayer("setMedia", stream).jPlayer("play");
  18. }
  19. },
  20. swfPath: "js",
  21. supplied: "mp3",
  22. preload: "none",
  23. wmode: "window"
  24. });
Comments powered by Disqus