Guiless jPlayer

249 views
Skip to first unread message

John Baron

unread,
Jun 27, 2011, 8:55:32 PM6/27/11
to jpl...@googlegroups.com
Hi, is it possible to make jPlayer play music - online radio stations without gui?

I am developing a console like app and i need it guiless.

Ian Sharpe

unread,
Jun 28, 2011, 6:07:21 AM6/28/11
to jpl...@googlegroups.com
Hi John
 
I'm using jPlayer entirely guiless with no problems. I just added the required <div> element, set the customCssIds property to false in the constructor and removed all other markup. Then just added some keyboard shortcuts to control the player.
 
Cheers
Ian
 
 
 
 


From: jpl...@googlegroups.com [mailto:jpl...@googlegroups.com] On Behalf Of John Baron
Sent: 28 June 2011 01:56
To: jpl...@googlegroups.com
Subject: [jPlayer] Guiless jPlayer

Hi, is it possible to make jPlayer play music - online radio stations without gui?

I am developing a console like app and i need it guiless.

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jplayer/-/BHq8A9hwDUgJ.
To post to this group, send email to jpl...@googlegroups.com.
To unsubscribe from this group, send email to jplayer+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jplayer?hl=en.

Mark Panaghiston

unread,
Jun 28, 2011, 12:12:29 PM6/28/11
to jpl...@googlegroups.com
This guide should help you understand making a simple interface.
http://www.jplayer.org/latest/quick-start-guide/api-cssSelector/

While that is not what you are asking about, it should help you understand what is going on.

John Baron

unread,
Jun 28, 2011, 12:12:50 PM6/28/11
to jpl...@googlegroups.com
HI thanks for your answer Presto.

Is it possible to give me a working example because i am new to jplayer or you have a demo somewhere on the net to watch it?

Mark Panaghiston

unread,
Jun 28, 2011, 12:16:14 PM6/28/11
to jpl...@googlegroups.com
It sounds like Presto is using jPlayer 1.x.

My link was for jPlayer 2.0.0

John Baron

unread,
Jun 28, 2011, 12:31:22 PM6/28/11
to jpl...@googlegroups.com
yes i am lookin at the example page you gave.. 

Well I cannot find a demo which takes a radio stream in the http://www.jplayer.org. damn. 

Mark Panaghiston

unread,
Jun 28, 2011, 12:37:12 PM6/28/11
to jpl...@googlegroups.com
http://www.jplayer.org/1.2.0/demo-08/

Then just add the urls to this and delete the HTML for the buttons you do not need.
http://www.jplayer.org/latest/demo-01/

The 3 items n the FAQ wrt streams:

Can jPlayer play SHOUTcast streams?
Yes.

How do I get jPlayer to play a SHOUTCast stream?
You need to setMedia to the stream URL. For example,
SHOUTcast server: http://mp3-vr-128.as34763.net/
MP3 stream URL: http://mp3-vr-128.as34763.net/;stream/1

My SHOUTCast stream does not work in browser X?
HTML5 browsers sometimes have problems with streams. The Flash fallback tends to work better x-browser. Use {solution:"flash,html"} if your find your stream does not work in some HTML5 browsers.


John Baron

unread,
Jun 28, 2011, 1:51:24 PM6/28/11
to jpl...@googlegroups.com
Thanks Mark i managed to make it play. yeeahhh.

Now the only problem i have is when i press the stop button music stops but streaming continues (i can see it in firebug).

Dede

unread,
Jun 28, 2011, 2:02:54 PM6/28/11
to jpl...@googlegroups.com
Hi,
first: we are not java script freakz or so. we are php programmers.
So we dont understand whats really going on in the scripts.

It would be very nice to have a htm code which is working ONLY with mp3
AND PLAYLIST.
All answers we got the last hours are based on single tracks, not on
playlist.

Take a look here: the 1st track is mp3 fromm our server, but plays OGG
from demo htm

http://www.goaplace.com/jQuery.jPlayer.1.2.0.demos/demo-02.htm#

i will cancel page in 2 days

Thx Dede

> --
> You received this message because you are subscribed to the Google
> Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/jplayer/-/Vrw4EIn7z44J.

Mark Panaghiston

unread,
Jun 28, 2011, 4:04:30 PM6/28/11
to jpl...@googlegroups.com
To stop the stream, you need to be canny... You need to do a clearMedia command:
http://www.jplayer.org/latest/developer-guide/#jPlayer-clearMedia

You want to disable the normal association with the jPlayer stop button... using the cssSelector object option.
cssSelector:{stop:""}

Then make your own click handler on the stop button to issue the clearMedia command.

To make it work again on the play button, you have to be canny once again...
Use an error handler to detect the URL_NOT_SET error event code and then you can use that to setMedia again back to your stream and play it again.
http://www.jplayer.org/latest/developer-guide/#jPlayer-event-error-codes


Reply all
Reply to author
Forward
0 new messages