We help IT Professionals succeed at work.

Jquery player

jonathanduane2010
jonathanduane2010 used Ask the Experts™
on
hi,

I have this jquery player on www.radioheadz.net and from a google group i got the following code to play my stream $("#jpId").jPlayer( {
  ready: function() {
    $(this).jPlayer( "setMedia", {
      mp3: "http://83.170.104.91:30865;/stream/1"
    });
  },
  supplied: "mp3"
);

i just done know what js file to amend?

Can anyone help?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Darude1234IT Employee (Developer & Helpdesk)

Commented:
This code is from the jQuery plugin "jPlayer". So the use this code you need jQuery with the jPlayer plugin.

jQuery can be downloaded from: http://jquery.com
The jPlayer plugin can be downloaded at: http://www.jplayer.org

Then include the following lines in the head-section of your webpage
<script type="text/javascript" src="/js/jquery.min.js">
<script type="text/javascript" src="/js/jquery.jplayer.min.js">

Open in new window


Then create a div-section on your webpage like this:
<div id="jpld"></div>

Open in new window


And use the following javascript-code to display the player in the corresponding div-section
$("#jpId").jPlayer( {
  ready: function() {
    $(this).jPlayer( "setMedia", {
      mp3: "http://83.170.104.91:30865;/stream/1"
    });
  },
  supplied: "mp3"
);

Open in new window


More information about jPlayer and how to use it can be found in the jPlayer Developer's Guide.
Darude1234IT Employee (Developer & Helpdesk)

Commented:
Oops, I copies the URL from your message, but see that there is a ; in the url, I suppose that the ; must be left from the url.

Author

Commented:
hi,

i have tried that but no luck :(

i have uploaded to http://zyder.actionit.ie/test.html
IT Employee (Developer & Helpdesk)
Commented:
I've searched for a solution to play shoutcast streams with jPlayer, but it seams that it is not possible with jPlayer.
Also the demo of jPlayer is a little misleading. Their standard template didn't work for me too, but I have changed it, see attachment and in this state it is possible to play regular audio formats. Maybe that will help you a little further.
jPlayer-Example.zip