PHP Playlist Generator (automatic, from directory contents)

6,167 views
Skip to first unread message

Nick C

unread,
Sep 21, 2010, 10:18:02 PM9/21/10
to jPlayer: the CSS styleable jQuery audio player plugin
First, thanks to the developer(s) of JPlayer! I've only used it
recreationally, but enjoyed how easy and straightforward it was to get
working.

While I enjoyed what the player could do inherently, I noticed that
playlists had to be manually created. I'm lazy, and didn't feel like
doing that...as I wanted to make a 100+ song playlist for a <a
href="http://demo.chapmanit.com/jplayerPlaylist/?random=true">page I
made</a>.

Thus, I wrote some PHP which generated the necessary JS for a complete
playlist, requiring only the location of the folder with the music. I
then added the ability to shuffle this generated playlist (which
orders by filename by default). The generated playlist can use
filename information or, with the help of the <a href="http://
getid3.sourceforge.net/">getID3 project</a>, can pull playlist
information from the actual file.

I didn't try, but the playlist generator should work with other
filetypes (such as OGG) supported by JPlayer.

The code I wrote could be duplicated fairly easily by a competent PHP
coder, but I thought my efforts may be able to save someone some
time. Please let me know if this could be helpful and I'll give the
code a home and make it available. For now, I only have the demo
project: <a href="http://demo.chapmanit.com/jplayerPlaylist/">http://
demo.chapmanit.com/jplayerPlaylist/</a>

Post here or email me (thenickchapman[somewherecloseto]gmail.com

Nick13

unread,
Sep 23, 2010, 6:30:15 PM9/23/10
to jPlayer: the CSS styleable jQuery audio player plugin
Heya, I just took a look at your Database example. Way Jealous.

I have been trying to get a similar thing working myself, only Ive
been thinking about using MySQL. In your post, if Im understanding
you, you're just pointing PHP to a folder? or a directory w/ all your
music inside? that would obviously be alot more ideal (for me atleast)
than dealing w/ a database...

Also, if you're looking for a way to update your jplayer once its been
built, you can see my demo http://inmomentmedia.dyndns.org/play/
I used PHP to write the playlist to a seperate json file and use ajax
to update it. (its not quite done yet, for some reason the ajax post
requires two run thru's to actually update. on both add and delete, so
like, double tap all the buttons. There is also a 20 second timer that
updates the playlist automatically.)

Nick C

unread,
Sep 23, 2010, 11:11:04 PM9/23/10
to jPlayer: the CSS styleable jQuery audio player plugin
Thanks for the feedback!

Not sure how I miscommunicated that the project involved databases,
but it doesn't. The code could (fairly) easily be modified to pull
the audio files from a database...or the names/file locations/id3 info
from one, but the demo and intention was just to read a directory
using PHP, and populate a JPlayer playlist based on the files inside.

Thanks for the tip about updating the player. I'm very limited in my
JSON (dabbled when working on my Photo Feed Display[http://
demo.chapmanit.com/picture_rss/] project) and AJAX, but will have to
eventually learn them because they are so beneficial in certain
situations!

I'll post the code and link to it here shortly.

I'll have a look at your project, too. Thanks for sharing!

Nick C

On Sep 23, 6:30 pm, Nick13 <nickthirt...@gmail.com> wrote:
> Heya, I just took a look at your Database example. Way Jealous.
>
> I have been trying to get a similar thing working myself, only Ive
> been thinking about using MySQL. In your post, if Im understanding
> you, you're just pointing PHP to a folder? or a directory w/ all your
> music inside? that would obviously be alot more ideal (for me atleast)
> than dealing w/ a database...
>
> Also, if you're looking for a way to update your jplayer once its been
> built, you can see my demohttp://inmomentmedia.dyndns.org/play/

Nick C

unread,
Sep 24, 2010, 12:25:21 AM9/24/10
to jPlayer: the CSS styleable jQuery audio player plugin
Here's the source code in case anyone can use it:
http://demo.chapmanit.com/jplayerPlaylist/source/

Jonathan2

unread,
Sep 24, 2010, 5:33:00 AM9/24/10
to jPlayer: the CSS styleable jQuery audio player plugin
Wow - that's pretty neat!

I actually wrote something to do the same thing a few months ago.
Although, when I say "wrote", I mean, bodged together from various
bits of code and demos, and to a "proper" programmer would look like
an absolute train wreck.

So I'm going to switch to yours...thanks!

nick putman

unread,
Sep 25, 2010, 7:39:52 AM9/25/10
to jpl...@googlegroups.com
Hi

Would this PHP playlist generator serve as a means of accessing my iTunes library on the move? I.e. My Computer is on at home with a fixed ip address, and the PHP points to my iTunes music folder. If so, would it be able to search in subfolders for music or would all the files have to be in one folder? You mention it can read file tags. Does this mean that it could be adapted to generate playlists for genres, artists, etc?

Thanks

Nick

> --
> You received this message because you are subscribed to the Google Groups "jPlayer: the CSS styleable jQuery audio player plugin" group.
> 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.
>

Nick C

unread,
Sep 29, 2010, 12:36:50 AM9/29/10
to jPlayer: the CSS styleable jQuery audio player plugin
Nick P,

Sorry for the delay.

This wasn't written as a means of doing any of what you are looking
for. It was written to generate a playlist from items in a single
folder (by filename or by tagged information), and allow randomization
of said playlist...

That said, it could likely be adapted to work with other code that
does much of what you want. I've written some pretty simple php that
searches a directory and all subfolders...you could probably have a
tree-like structure built...with each item in the tree (if it is of
media file type) self-link, passing the 'full file location'...which
could be used to play a file at a time. Even better, you could likely
use JS (as Nick13 mentions and demonstrates above?) to add to / update
the playlist on the fly. I'm not very good with Javascript...and have
done nothing with Ajax, so I can offer very little assistance with it.

I have a dyndns account and run a development web server on my
computer, so may have a similar setup to you. I've run into a little
trouble accessing videos outside of my server root in the past. I use
ZenPhoto, though...pointing to a folder outside my server root, which
seems to traverse many subfolders and display everything without much
problem...so it definitely seems doable.

Just out of curiosity, do you think you may be better off using:
1- something like winamp remote? not sure if there is an itunes
version. lets you access your media files without any hassle.
2- vnc software (uvnc) to remotely connect and simulate a typical
computer experience.

As far as the playlist generation by genre / artist / etc...that is
standard information available via tags, so I think that would be easy
enough to add. I'm not especially interesting in expanding this
project (officially) to the scope you seem interested in, but will be
happy to help if I can. There may already be more full-featured code
which is better suited for what your are looking for, though.

Not sure where you are planning to access your music from, exactly,
but I was pretty impressed that the JPlayer worked from my cousin's
iPhone...but not from my brother-in-law's android phone. or was it a
blackberry...? Anyway, may be worth keeping in mind.

nc

Nick C

unread,
Sep 29, 2010, 12:39:32 AM9/29/10
to jPlayer: the CSS styleable jQuery audio player plugin
Jonathan,

I don't know that I did loads more than 'bodged' my code...but I was
happy with the turnout! It has been a fun project.

Thanks for the feedback. It made me feel better about the time I put
into it. If you are using any type of public implementation, I'd love
to see the result.

nc

thesailor

unread,
Oct 9, 2010, 3:18:21 AM10/9/10
to jPlayer: the CSS styleable jQuery audio player plugin
amazing work..

this is just what i was looking for ..
i wanted to build a casual site for my friends to post mixtapes..

and i have it running as a test site and its great..
just one thing....
i am wondering what is making the order of the files,
as it doesnt seem to be making them in the order of the folder,
kind of random..

what would i change to make it put the files in a
numbered order by file name?
say 01 first song
02 second song

would ya know?

again... amazing work.

i would love to use this on my site,
and if it goes any where commercially,
i could give ya something for it...

the sailor

Nick C

unread,
Oct 12, 2010, 12:02:07 PM10/12/10
to jPlayer: the CSS styleable jQuery audio player plugin
*duplicate of reply to author in case the information helps anyone
else*
---
I meant to reply to this days ago. I think I actually did it, but let
my session expire and somehow lost the reply. Here goes:

Thanks for the kind words. I just made a site kinda similar to what
you are describing, I think. Have a look:
http://chapmanit.thruhere.net/nick/dev/birthday.php

^^ basically, it allows someone to 'send me songs' in lieu of making
me a mixed CD for my birthday. Then, the code displays a list of the
files uploaded by each given user...and links to a Player (using the
playlist generator) for each user's uploaded files. If you aren't
already past that stage, let me know and I'll upload the files to
you. I almost made it more advanced and stored the information in a
database, but decided to create a folder for each user name and just
'point' to the folder name to specify which folder to read from for
the player. It does what I needed it to.

As for your question, you could ksort() [http://php.net/manual/en/
function.ksort.php] the array before the foreach call to sort the
array by filename (which is the key). You can sort by the value
instead using asort() [http://php.net/manual/en/function.asort.php],
if you want to sort by the id3 values. I think the artist name and
track title are the only two things pulled, so I'm not sure you could
sort by anything but one of those two without digging a little into
the code or adding more info to the array. Let me know, though, if
you need help with this as I still like coding and would likely be
willing to lend a hand if you run into trouble yourself.

No plans for going commercial, but it is nice to hear that it could be
that useful. I do sell out my coding services to those looking to
hire. Tell your friends. ;-p

nc

Nick C

unread,
Oct 24, 2010, 12:31:32 PM10/24/10
to jPlayer: the CSS styleable jQuery audio player plugin
I ended up making a more generic site based on the 'send me music'
idea discussed above, after a request by tarran the sailor. I didn't
put tons of time into it, but I stripped my data out of the birthday
page linked to above...but kept the layout and style. It should be
pretty easy for anyone with much php experience to implement. Aside
the web host restrictions which I'll mention below, it should
basically be plug and play...after a couple of 'configuration'
variables are changed. Any moderate changes may take some more work,
but that should be expected, I think.

here's the generic site (extracts to a 'sendmemusic' folder):
http://chapmanit.thruhere.net/nick/sendmemusic.zip
(if you have any trouble, let me know...I may be interested in fixing
this code as I might use it as a code base for a site I plan on
implementing at http://yaheard.us)

A few notes I mentioned to Tarran:

1- If you have a webhost, you can probably dump this into a subfolder
of a site you own. It should work, but you may have errors when
trying to upload songs...if so, your web host may not be giving you
enough memory to accept a temporary file, then transfer it to the
necessary location, after alloting the necessary information to load
your webpage and graphics and so on.

2- My webhost is pretty basic (they give me 16MB of memory) -- not
enough to load a web page, process the graphics I had on the page, and
accept any sizable upload. I ended up storing this script on my home
computer, which is, primarily, a development server...not production.
If you need to do this, you can probably download and run xampp if you
want to start a little project. It isn't terribly difficult and could
be fun if you have an hour or two to spare. From there, you'd just
copy 'sendmemusic' (the folder) to your c:/xampp/htdocs folder...or
wherever you installed xampp. Xampp, by default, doesn't limit your
memory, I think? If so, you own it...so it can be adjusted relatively
easily.

3- You will probably want to edit the variables in the sendmemusic/
index.php file...this may be necessary to get the thing to work, or at
least look like your page instead of a generic one.

nc

On Oct 12, 12:02 pm, Nick C <thenickchap...@gmail.com> wrote:
> *duplicate of reply to author in case the information helps anyone
> else*
> ---
> I meant to reply to this days ago.  I think I actually did it, but let
> my session expire and somehow lost the reply.  Here goes:
>
> Thanks for the kind words.  I just made a site kinda similar to what
> you are describing, I think.  Have a look:http://chapmanit.thruhere.net/nick/dev/birthday.php
>
> ^^ basically, it allows someone to 'send me songs' in lieu of making
> me a mixed CD for my birthday.  Then, the code displays a list of the
> files uploaded by each given user...and links to a Player (using theplaylistgenerator) for each user's uploaded files.  If you aren't
> > > > > > using PHP, and populate a JPlayerplaylistbased on the files inside.
>
> > > > > > Thanks for the tip about updating the player.  I'm very limited in my
> > > > > > JSON (dabbled when working on my Photo Feed Display[http://
> > > > > > demo.chapmanit.com/picture_rss/] project) and AJAX, but will have to
> > > > > > eventually learn them because they are so beneficial in certain
> > > > > > situations!
>
> > > > > > I'll post the code and link to it here shortly.
>
> > > > > > I'll have a look at your project, too.  Thanks for sharing!
>
> > > > > > Nick C
>
> > > > > > On Sep 23, 6:30 pm, Nick13 <nickthirt...@gmail.com> wrote:
>
> > > > > > > Heya, I just took a look at your Database example. Way Jealous.
>
> > > > > > > I have been trying to get a similar thing working myself, only Ive
> > > > > > > been thinking about using MySQL. In your post, if Im understanding
> > > > > > > you, you're just pointing PHP to a folder? or a directory w/ all your
> > > > > > > music inside? that would obviously be alot more ideal (for me atleast)
> > > > > > > than dealing w/ a database...
>
> > > > > > > Also, if you're looking for a way to update your jplayer once its been
> > > > > > > built, you can see my demohttp://inmomentmedia.dyndns.org/play/
> > > > > > > I used PHP to write theplaylistto a seperate json file and use ajax
> > > > > > > to update it. (its not quite done yet, for some reason the ajax post
> > > > > > > requires two run thru's to actually update. on both add and delete, so
> > > > > > > like, double tap all the buttons. There is also a 20 second timer that
> > > > > > > updates theplaylistautomatically.)
>
> > > > > > > On Sep 21, 9:18 pm, Nick C <thenickchap...@gmail.com> wrote:
>
> > > > > > > > First, thanks to the developer(s) of JPlayer!  I've only used it
> > > > > > > > recreationally, but enjoyed how easy and straightforward it was to get
> > > > > > > > working.
>
> > > > > > > > While I enjoyed what the player could do inherently, I noticed that
> > > > > > > > playlists had to be manually created.  I'm lazy, and didn't feel like
> > > > > > > > doing that...as I wanted to make a 100+ songplaylistfor a <a
> > > > > > > > href="http://demo.chapmanit.com/jplayerPlaylist/?random=true">page I
> > > > > > > > made</a>.
>
> > > > > > > > Thus, I wrote some PHP which generated the necessary JS for a complete
> > > > > > > >playlist, requiring only the location of the folder with the music.  I
> > > > > > > > then added the ability to shuffle this generatedplaylist(which
> > > > > > > > orders by filename by default).  The generatedplaylistcan use
> > > > > > > > filename information or, with the help of the <a href="http://
> > > > > > > > getid3.sourceforge.net/">getID3 project</a>, can pullplaylist
> > > > > > > > information from the actual file.
>
> > > > > > > > I didn't try, but theplaylistgenerator should work with other

Nick C

unread,
Nov 1, 2010, 12:50:29 AM11/1/10
to jPlayer: the CSS styleable jQuery audio player plugin
I updated some of the functionality of the first implementation of
this code code (from my birthday page -- http://chapmanit.thruhere.net/nick/dev/birthday.php)
so that it now looks for songs in the specified folder, and also
traverses subfolders. This allows me to implement the 'play all'
feature found there; prior to this i was only able to play specific
subsets of all the available files.

I'm sure this could be rewritten as a recursive function for more
efficiency. I don't have the need currently, but will be happy to
update the 'sendmemusic.zip' file above if anyone needs the more
current version.

For clarification, the main difference between the above and what I
can make available is that I've modified the code so that files in the
specified directory and subfolders (first level) of that directory are
added to the playlist.

Let me know if you could use this code and I'll re-do the generic
download above.

nc

On Oct 24, 12:31 pm, Nick C <thenickchap...@gmail.com> wrote:
> I ended up making a more generic site based on the 'send me music'
> idea discussed above, after a request by tarran the sailor.  I didn't
> put tons of time into it, but I stripped my data out of the birthday
> page linked to above...but kept the layout and style.  It should be
> pretty easy for anyone with much php experience to implement.  Aside
> the web host restrictions which I'll mention below, it should
> basically be plug and play...after a couple of 'configuration'
> variables are changed.  Any moderate changes may take some more work,
> but that should be expected, I think.
>
> here's the generic site (extracts to a 'sendmemusic' folder):http://chapmanit.thruhere.net/nick/sendmemusic.zip
> (if you have any trouble, let me know...I may be interested in fixing
> this code as I might use it as a code base for a site I plan on
> implementing athttp://yaheard.us)
> ...
>
> read more »

jschoff

unread,
Nov 2, 2010, 1:00:49 PM11/2/10
to jPlayer: the CSS styleable jQuery audio player plugin
Hi Nick,

First, let me just say thanks! I am playing around with a way to share
files between my friends and I and installed a file manager (http://
labs.corefive.com/Projects/FileManager/). I thought it would be great
to have an audio player to use in conjunction with it and stumbled
across jPlayer, which was perfect, except it couldn't generate a
playlist. Then I found your thread here, and I'm thrilled! This is
exactly what I needed, so thanks very much for putting in the time.

That being said, I would greatly appreciate the updated code that
incorporates sub directories into the playlists.

Thanks,
Jesse

Nick C

unread,
Nov 3, 2010, 1:03:32 AM11/3/10
to jPlayer: the CSS styleable jQuery audio player plugin, jesse...@gmail.com
JPlayer Playlister / PHP Playlist Generator version 0.2

Thanks for waiting around. I got around to (somewhat) cleaning up the
modified code. I still didn't make it recursive, so it currently only
reads files from the target directory + one subfolder. Like I
mentioned, let me know if you have trouble because I may want to make
this code recursive anyway.

Here's the link to the downloadable code. It is basically a self-
contained demo page. If you are comfortable with PHP, you should be
able to modify it as you see fit. I think you'll be fine if you were
able to get the original code working...this has a few more features /
options, but can be just as basic, too:

_download_
http://chapmanit.thruhere.net/nick/source/JPlayer_Playlister_0.2.zip

You can see the implementation in action here:
http://chapmanit.thruhere.net/nick/dev/birthday.php >> Click 'Play
All' or any individual user name.

It sounds like your implementation is just for friends, but I'd love
to have a look if you make anything public.

In addition, check out Zina (mentioned briefly above) if you want to
remotely access your music library...honestly, super easily. Initial
setup (running XAMPP) took me like an hour to get it going...but that
was mostly figuring out how to point to a music location that wasn't
in my web root (htdocs)...basically, I'm pointing at 'My Music' now
and it works.

Take care!

Luke

unread,
Mar 9, 2011, 2:16:38 PM3/9/11
to jpl...@googlegroups.com, ljfer...@gmail.com
Hey Nick- thanks for this code. Its exactly what I've been looking for, except...
I added a few lines to identify the filetype and include ogg in the playlist rather than list all mp3 and ogg files as separate tracks in the playlist.
basically I added 'fileformat' as an additional array variable and then appended ogg to the playlist output if it exists. It's very quick and dirty but it suits my needs and I'm sure it can be built off of as well.
example here:

Thanks again!
-Luke

Nick C

unread,
Mar 9, 2011, 10:06:38 PM3/9/11
to jPlayer: HTML5 Audio & Video for jQuery
Luke,

Glad this worked for you and hope it saved you some coding time. I
hadn't thought of having both MP3 and OGG versions of the same
song...I guess I was only thinking about my setup.

I just released version 0.3 of JPlayer Playlister:
http://chapmanit.thruhere.net/nick/source/v_0.3/ (demo)
http://chapmanit.thruhere.net/nick/dev/music/ (implementation)

__v0.3 added features__
-recurses subfolders indefinitely (v0.2 only played songs in target
folder and one level of subfolders)
-specifying filetypes or disallowing files or folders is more
manageable
-added option to sort by mtime (date/time added)

Take it easy and thanks for the feedback!

Nick C

Luke

unread,
Mar 10, 2011, 8:53:03 AM3/10/11
to jPlayer: HTML5 Audio & Video for jQuery
FYI my modified PHP is now on the above site- I switched over to .3
before I posted. Thanks again!

-Luke

nick chapman

unread,
Mar 10, 2011, 9:36:57 AM3/10/11
to jpl...@googlegroups.com
Thanks!  I'll have a look and see if it is something I should add to the base code or implement as an option or whatever.  Thanks for doing this and sharing!

nc

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.

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.




--
Nick Chapman
http://chapmanit.com
203.527.0248 | office (gv)
828.230.7184 | cell

Billz

unread,
Mar 26, 2011, 4:58:01 AM3/26/11
to jPlayer: HTML5 Audio & Video for jQuery
Hello,

I'm using your latest release which has a download link. When I click
the download link the song plays. Would it be possible to click the
download link and make the song actually download? I even added code
to my htaccess file to try and force the download. It seems like the
issue is jplayer itself, it thinks I'm wanting to play the song since
I'm selecting it in the playlist.

nick chapman

unread,
Mar 26, 2011, 3:15:11 PM3/26/11
to jpl...@googlegroups.com
Glad the code is working for you!  The download thing is a JPlayer issue.  Sorry.  You can probably get fancy and reference a download script, passing the file name/location...but it's beyond the scope of this.

This may be a good reference:

Just a question...are you having trouble with IE or FF < 4.0 (browsers which make use of the flash component as opposed to HTML5) displaying the songs?

Thanks!

nc


--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
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.

J. Frank Parnell

unread,
Mar 26, 2011, 9:08:28 PM3/26/11
to jPlayer: HTML5 Audio & Video for jQuery
Howdy, I was able to get the html/js portion of your example working
(i'll do my own php in a bit here). But it was only after using
the .js and .swf that you include in your download, that is, the js
and swf from jplayer.org doesnt work. Your js/swf are considerably
smaller in size. Just wondering what is up with that?

nick chapman

unread,
Mar 26, 2011, 9:25:48 PM3/26/11
to jpl...@googlegroups.com
I'm assuming mine are from an older release.  I should update the base code to be compliant with the current JPlayer version, though.

Thanks for letting me know!  I'll try to add a note on the demo page so no one else is surprised until I can address it more properly!

If you have anything public that makes use of the script or parts, I'd love to see it for my own enjoyment.  Thanks!

Nick C


--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
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.

J. Frank Parnell

unread,
Mar 26, 2011, 11:29:04 PM3/26/11
to jPlayer: HTML5 Audio & Video for jQuery
Ok, yeah, that makes sense. I've been trying all day to get something
working with this. I'm more a php guy than js by far. I just
stripped out your php and put in a static list in the head just to see
it working on my server with my files. I couldnt get just a single,
mp3 playing player working with the current official download, which
is why I posted a thread here asking for a simple example. I bet the
version problem was hanging me up trying to use examples from the list
and in here. ...ah, I see now, you use 1.2 and he is up to 2.0.
Well, have you had any issues with your script? Different browsers,
etc?

On Mar 26, 6:25 pm, nick chapman <thenickchap...@gmail.com> wrote:
> I'm assuming mine are from an older release.  I should update the base code
> to be compliant with the current JPlayer version, though.
>
> Thanks for letting me know!  I'll try to add a note on the demo page so no
> one else is surprised until I can address it more properly!
>
> If you have anything public that makes use of the script or parts, I'd love
> to see it for my own enjoyment.  Thanks!
>
> Nick C
>
> On Sat, Mar 26, 2011 at 9:08 PM, J. Frank Parnell <jugl...@gmail.com> wrote:
>
>
>
> > Howdy, I was able to get the html/js portion of your example working
> > (i'll do my own php in a bit here).  But it was only after using
> > the .js and .swf that you include in your download, that is, the js
> > and swf from jplayer.org doesnt work.  Your js/swf are considerably
> > smaller in size.  Just wondering what is up with that?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jPlayer: HTML5 Audio & Video for jQuery" group.
> > 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.
>
> --
> Nick Chapmanhttp://chapmanit.com

nick chapman

unread,
Mar 27, 2011, 12:29:06 AM3/27/11
to jpl...@googlegroups.com
Nah.  No trouble at all.  Mostly tried on IE 7, IE 8, Chome, and FF 3.6.

IEs and FF use flash player with no trouble.  Chrome plays html5 no trouble.

Sorry for the hold-up.  I should list what version JPlayer i'm using on the page.  My mistake!  I'll def have to fix it so no one else has issues.

I think JPlayer 2.0 may be more optimized (use less resources)...but I think the main addition was video (better video) support.  As far as I remember, anyway.

You can probably view the 'old' code on the JPlayer page, too...if you want to test it in some browsers.  The demos there are what my script is based on.

Let me know if I can be of help!

Nick C

Mark Panaghiston

unread,
Mar 29, 2011, 2:41:27 PM3/29/11
to jpl...@googlegroups.com, nick chapman
Sorry for not contributing to this topic. I'm more of a JavaScript dev than PHP, so figured I'd leave it to you guys since you seemed to be getting somewhere. It seems like the community has sorted you out. Thank you to all involved!

I just wanted to say that all the old releases can be found on the downloads page. All the old info is there, the old demos, the old dev guides.
http://www.jplayer.org/download/

Just be aware that the site navigation at the top of the pages will always return you to the latest version.

Each time we make a new release, the /latest/ part of the url is changed to point to the new version. ie., at the moment /latest/ is really /2.0.0/

Best regards,
Mark P.

plaine

unread,
May 23, 2011, 12:43:45 PM5/23/11
to jpl...@googlegroups.com
This is a great enhancement to jPlayer.  Great job to you and of course, to the jPlayer founders for such a solid platform.  I have a newbie question in regards to this PHP Playlist Generator.  Is it possible to target and start playing a song from a link on  page?  Right now, I have the following code on my page, but it doesn't seem to be working, and my php/js skills are limited.

<script type="text/javascript">
$("#brett").click( function(e) {
  $("#jquery_jplayer").jPlayer("setFile","songs/brett.mp3").jPlayer("play");
  return false;
});</script>
<a href="#" id="brett" target="_blank">Bobby's Track</a>

So, on a page, I'm trying to open up a new window with jPlayer (being driven by PHP Playlist Generator) and being playing the track "brett.mp3".  However, its not working.  Thanks for any advice you can give me.

nick chapman

unread,
May 23, 2011, 12:53:14 PM5/23/11
to jpl...@googlegroups.com
I'm not much of a js person, myself.  However, I can usually make due...but fair far better when I have a link to the code.

Pass one my way and I'll see if I can be of any help. If not, I'll have to refer you to the JPlayer forums. At first glance, I think it is definitely doable.

Thanks for the feedback and question...I'll do what I can to help.

nc


--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
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.

J. Frank Parnell

unread,
May 23, 2011, 1:41:10 PM5/23/11
to jPlayer: HTML5 Audio & Video for jQuery

If I understand the orig question, here is a couple ways of starting
at a particular song in the list:
http://groups.google.com/group/jplayer/browse_thread/thread/1362a71fca19b23/8432016d32ea3a61#8432016d32ea3a61

in my examples, remove the beta. from the urls.

plaine

unread,
May 23, 2011, 2:00:05 PM5/23/11
to jPlayer: HTML5 Audio & Video for jQuery
Thanks. I did see that thread last evening and was going to give it a
shot, but then I found the PHP Playlist Generator this morning. Upon
giving this a quick shot, it doesn't seem to play nice with the PHP
Playlist Generator -or- (more likely?) I'm too unskilled to edit it
enough to make the revision based on that Playlist Generator code.
I'll keep plugging away for a bit longer on it. I also would like to
reference the actual filename uploaded, rather than its position in
the playlist order as this sample code does in the thread you directed
me to, since the order of the playlist will change often.

On May 23, 12:41 pm, "J. Frank Parnell" <jugl...@gmail.com> wrote:
> If I understand the orig question, here is a couple ways of starting
> at a particular song in the list:http://groups.google.com/group/jplayer/browse_thread/thread/1362a71fc...

plaine

unread,
May 23, 2011, 2:04:48 PM5/23/11
to jPlayer: HTML5 Audio & Video for jQuery
Thanks! That's awesome. I'm really hoping we can use jplayer and
your playlist on a project we're wrapping up. Since the client has to
update it, your playlist generator is the key. Otherwise, we may
stick with the Wimpy Rave route, but I really wanna roll with jPlayer
for HTML5 reasons. Anyway, I just modified your file, adding the link
text in the right column under Change Log and its located here:
http://republic.plainestudios.com/music/
Clicking the DCFC link should open a new window and play that track in
the playlist.
Thanks!
> Nick Chapmanhttp://chapmanit.com

J. Frank Parnell

unread,
May 23, 2011, 2:36:04 PM5/23/11
to jPlayer: HTML5 Audio & Video for jQuery
Well, the php pl generator wouldnt really have anything to do with
it. Did you try my 1st solution in my second post or Mark's
solution? Mark's (and that is what i am now using) should be more
playlist agnostic http://radiokdug.com/index.php?page=band&band=12&song=2

if you want to ref a song name in the url, I would use php to
determine which number the song is in the playlist. Note that you may
run into problems if there are spaces or non-url chars in the
filename. But, those problems should be surmountable. I forget
exactly how Nick's code works, but in the loop that creates the list,
I would compare each filename to the filename in the url and store the
index number of the matching file in a var for use in Mark's
"audioPlaylist.current" JS var.

plaine

unread,
May 23, 2011, 5:42:30 PM5/23/11
to jpl...@googlegroups.com
I got this to work, as you can see at that same link I posted.  I had my order wrong... really embarrassing rookie mistake.  I rarely deal with js and fall on my face a whole lot.  So those links are now calling the track, but I've now got 2 other issues.

1.  The playlist doesn't update showing the track that's being played.  I fear making that happen is well beyond my abilities, but if this is cake for someone to chime in on and point me in the right direction, I'm all ears.
2.  When clicking the links, it doesn't open the player in a new window.  My goal is to have some text links on a site and clicking opens the player in a new window.

Any advice?

nick chapman

unread,
May 23, 2011, 10:00:15 PM5/23/11
to jpl...@googlegroups.com
How are you with PHP?

Sounds like you could just modify the link to self call the page <a href="?track=tracktoplay.mp3" target="_blank">play song</a> (instead of using a js link) and pare-down the playlist based on the selection...the development version of the JPlayer Playlister (.4 -- not yet released, based on JPlayer 2.0) has a built-in filtering ability which allows subfolders to be filtered by...that code might make doing what you want to do a little easier.

Still, it sounds like self-linking with the file-name is a good option...then you just have to modify the 'playlist' section of the code to only add that song to playlist.

If you don't need the actual playlist generator for other parts of the site, though, it may be beneficial just to list folder contents (you should be able to dig it out of the playlister part of the code) or find some other code to list contents...and use more basic jplayer (non playlist setup) instance to play.

---

sorry to offer so many different ways to do this...but another thing you can do is use the playlist function (instead of the single insteance function...which I think you are using).  Change your js to call the following function:
playListChange( index )
...where 'index' is the 'number' of item in the playlist. It won't update the playlist, though...that'll take using one of the above options. This method is what clicking a track which is part of the playlist does...so you are just emulating that.

Hope some of my rambling helps.  If it doesn't...and you aren't able to get it to do what you want, let me know...and I'll get more hands-on.

take it easy!

nc

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
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.

plaine

unread,
May 23, 2011, 10:48:55 PM5/23/11
to jpl...@googlegroups.com
Thanks, Nick.  I like the sound of the first option, but am not sure it'll do what I want.  What I'm trying to do exactly, is this.  I should have been more complete in my original post.

There are a list to tracks links on a page.  Say 50 of them all linking to a single track in a master playlist that populates from a directory.  Clicking a link opens the jPlayer in a popup and begins playing that track.  There is one master playlist containing all the tracks, so this link would trigger the player to play that specified track and then after its complete, move on to playing whatever the next track in the playlist happened to be (or goes to a random selection).

By the sound of it, I can do an <a href=?track=track.mp3"... to get at that track, but then I won't have the actual playlist, it would just be playing a single track, correct?  I do most certainly want to retain the PHP Playlist Generator portion so the list can be populated in that manner, but I want to be able to call a particular file in that big old playlist on click.

nick chapman

unread,
May 24, 2011, 12:43:05 AM5/24/11
to jpl...@googlegroups.com
Hmmmm...I think I see what you need.

You can use the other solution -- just use the code built-in to the player.  You'll just have to add the 'index' into your link, somehow (would be easy to call it on local page)...and pass that to a 'new' player in a new window...then pull the index from the link and apply the play command with javascript.  I'm speaking kinda abstractly and, as I mentioned, am not a wonderful js coder...but it seems doable, I think.  You will probably want to modify the built-in link to call a new page instead of using the palylist functions to 'play-on-click'.  

That is what makes me think that you may be better off using separate code to display the list of available tracks (modified playlister php), though...then, when clicked, open the JPlayer popup, indicating a certain index (song) to begin playing.

Let us know how progress goes.  Again, I may try to jump in and get my hands dirty if you get stuck and I find a little time.

Another curiosity...why do you prefer the 'pop-up' player to playing from the primary page?  I'm kinda anti pop-up players (for no good reason, to be honest)...so I thought I'd see what your reasons are.  Thanks!

nc

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
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.

plaine

unread,
May 24, 2011, 10:06:40 AM5/24/11
to jPlayer: HTML5 Audio & Video for jQuery
Thanks, I'll play around with it some more today before I move on to
my fallback Wimpy player. The reason for a popup is that users should
be able to keep the music going in a separate window while they
navigate the rest of the site and, if they leave the site, have the
music continue playing from that playlist as well should they want to
keep listening.
> Nick Chapmanhttp://chapmanit.com

nick chapman

unread,
May 24, 2011, 3:54:00 PM5/24/11
to jpl...@googlegroups.com
Well...that certainly makes sense.  I think each browser handles to 'target="_blank" ' thing differently...but I think I have made pop-up windows with javascript pretty predictably.  Good luck finding it and chaining your requests together.

Just as a FYI, here's a playlist built on the (soon to be released) 0.4 version of the playlister:

...which is based on the developmental source, here (hasn't been updated for easy download yet)
(built on jPlayer 2.0)

Hopefully, the built-in filter functionality will point you in the right direction of accepting input to determine which files appear on the playlist.

Best of luck!

nc

plaine

unread,
May 24, 2011, 4:36:14 PM5/24/11
to jPlayer: HTML5 Audio & Video for jQuery
Thanks, Nick. I do genuinely appreciate the advice and insights.
However, after spending another 2 hours on this earlier today, I've
decided to just use Wimpy Rave. Which stinks, because its not the
greatest player and certainly isn't HTML5 compliant, but I've had to
move on. I do look forward to checking back on on the jPlayer project
and all of the offshoots as time goes along, however, in hopes that
sometime in the next year or so, something will exist to do this and
I'll be able to revamp the audio player for our client. Thanks a lot,
I do appreciate the prompt responses and insights and best wishes
toward your future development!

nick chapman

unread,
May 24, 2011, 10:07:09 PM5/24/11
to jpl...@googlegroups.com
Best of luck.  If I get a little time, I may work up something that (as far as I can tell) does what you want.  If so, I'll post it here in case it is helpful.

Take care!

nc

plaine

unread,
May 24, 2011, 10:35:04 PM5/24/11
to jPlayer: HTML5 Audio & Video for jQuery
Thanks! I'll stay tuned here as time moves along and may end up
picking this back up myself and teaching myself some new things via
jPlayer as well. It's just we've gotta launch this new site next week
and I've got a baby coming in 3 weeks, so my time to learn new tasks
is pretty limited these days as those two big "deadlines" loom. :)
Best wishes,

...chris

Hagay

unread,
Feb 4, 2012, 1:39:34 AM2/4/12
to jpl...@googlegroups.com
First of all, a big chapeaux, great work, and awesome output.
One issue. if the directory contains non English file names, the output is Gibberish, and these files jplayer doesn't play!
If I change the encoding to ISO-8859-I or Windows-1255, the files are displayed fine, but only jplayer on Chrome finds them and and can play them. On Firefox and IE (all), files still can't be found, and played.
Any ideas? 

nick chapman

unread,
Feb 4, 2012, 9:59:15 AM2/4/12
to jpl...@googlegroups.com
Glad this looks like something you may be able to use!  I'll do my best to assist you in getting the jPlaylister to work properly.

When you 'view source' of the page, do you see playlist items at all?  If so, are they incorrect?

If you have a public link you could share, I may be of more assistance...I haven't done much work with various languages or encoding types.  I dabbled with UTF-8 for one modification...but that is it, and I think the files were working (playing) from the start...just not displaying correctly.  I feel like it may have something to do with your PHP/apache settings...but presumably you have other pages working correctly, so that is less likely to be an issue?

Let me know.

Nick C
(jPlaylister developer)

--
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/-/aLGnWQdLP0EJ.

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.

Hagay

unread,
Feb 5, 2012, 1:37:25 AM2/5/12
to jpl...@googlegroups.com
Hi Nick and thanks for the quick reply.
I had uploaded the package to my server (BTW, the source package has some mix up with the CSS, files. and I had to manipulate those), 
and now you can see the problem here.
I managed to reduce the Gibberish by changing the charset to UTF-8 (instead of iso-8859-1), and now the problem is the following:
  • Hebrew file names are cut (the first word is chopped). In source view of the page, these names appear OK!
  • These files are played on Chrome, but not on Firefox and IE.


nick chapman

unread,
Feb 5, 2012, 2:02:09 AM2/5/12
to jpl...@googlegroups.com
Glad to help!

What is the mix-up with the source files?  Any details (and, preferably, examples) will help me fix the problem so others don't experience it.

For instance, I downloaded the source, extracted to a new folder on my test server, and verified it worked worked "out of the box" on IE9 and Chrome...it did with no problems.

When I visit the link you provided, I get a 'page not found' error.

Sounds promising that the file names are displaying properly in the source...that should mean I can address the issue once I can properly duplicate it with working code.  Let me know if you get the link up and running and I'll get to work trying to determine where the flaw/oversight in my code is, and hopefully fix the CSS issues you mentioned.

Nick C

--
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/-/qUKxUV-KLoQJ.

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.

Hagay

unread,
Feb 5, 2012, 2:13:10 AM2/5/12
to jpl...@googlegroups.com
Thanks again.

Your are right, I had a cache issue with the CSS. (my cache used the old one).
For the same reason I renamed the folder, and that's why the link didn't work. 
Here is the working link.

Hagay

nick chapman

unread,
Feb 6, 2012, 6:24:37 PM2/6/12
to jpl...@googlegroups.com
Hagay,

Sorry for the delay.

I found the problem...seems to be an issue with the getID3 class I use...must not handle various character sets or something.

I wrote in a couple of lines of code to work around.  I can send you the 'source' (index.php) or tell you which lines of code I modified (in context, so you can search and replace).

let me know which you prefer.

working demo:

nonworking version

I'll remove the songs for the demo soon..just wanted to leave them there for you to see it working and non.

nc

--
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/-/DGll883oE4gJ.

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.

Hagay

unread,
Feb 7, 2012, 12:20:50 AM2/7/12
to jpl...@googlegroups.com
Hi Nick,

Thanks for the effort, and for the 0.6 (beta) version.
I suspected that getID3 was responsible for the bad file names.
I have checked with 3 browsers, IE 7 & 8, Chrome 16.0.912.77, and Firefox 3.6.26:
In all browsers, file names are presented OK.
In Chrome everything works fine.
In IE (both): Only audio files with Latin file names work!
In Firefox: No track ()audio & video) is played, No poster is shown, and a commented line of code is displayed inside the player above the controls div.
See the attached image.

Hagay
JPlayer_Playlister.JPG

nick chapman

unread,
Feb 7, 2012, 12:49:41 AM2/7/12
to jpl...@googlegroups.com
It looks like HTML5 play, via JPlayer, is working (Chrome)...but flash-based browsers (all the other browsers/versions) aren't working.

I verified that IE9 is working (displaying and playing).

Sadly, I'm not overly concerned with, nor capable of helping with, flash problems.  I know nothing about flash and would be useless at helping troubleshoot the problems at that point.

Maybe flash (local plugin/install, or even that Jplayer.swf file) can be configured to properly handle the files?  I'm just guessing.

If you can create a static page (not one relying on my playlister code), you can try to get help from a new JPlayer Groups thread?

nc


Hagay

--
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/-/zLaf32TXv8oJ.

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.

Cindy Scinto

unread,
Mar 16, 2012, 3:00:53 PM3/16/12
to jpl...@googlegroups.com
This is all so amazingly wonderful. I have some php knowledge. I'm trying to figure out where to implement the code. 
It may be that I'm attempting the worst scenario--add this to a page on a wordpress site. Is it possible? 
The php source code won't apply when posted in a page on wp site. Although, I am using a theme that allows for individual head html on a page or post. 

Anyway someone willing to give me a few steps to follow? I'm always willing to do the work!

Cindy 8^)


On Monday, February 6, 2012 9:49:41 PM UTC-8, Nick C wrote:
It looks like HTML5 play, via JPlayer, is working (Chrome)...but flash-based browsers (all the other browsers/versions) aren't working.

I verified that IE9 is working (displaying and playing).

Sadly, I'm not overly concerned with, nor capable of helping with, flash problems.  I know nothing about flash and would be useless at helping troubleshoot the problems at that point.

Maybe flash (local plugin/install, or even that Jplayer.swf file) can be configured to properly handle the files?  I'm just guessing.

If you can create a static page (not one relying on my playlister code), you can try to get help from a new JPlayer Groups thread?

nc

On Tue, Feb 7, 2012 at 12:20 AM, Hagay <hagay...@gmail.com> wrote:
Hi Nick,

Thanks for the effort, and for the 0.6 (beta) version.
I suspected that getID3 was responsible for the bad file names.
I have checked with 3 browsers, IE 7 & 8, Chrome 16.0.912.77, and Firefox 3.6.26:
In all browsers, file names are presented OK.
In Chrome everything works fine.
In IE (both): Only audio files with Latin file names work!
In Firefox: No track ()audio & video) is played, No poster is shown, and a commented line of code is displayed inside the player above the controls div.
See the attached image.

Hagay

--
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/-/zLaf32TXv8oJ.

To post to this group, send email to jpl...@googlegroups.com.
To unsubscribe from this group, send email to jplayer+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jplayer?hl=en.

nick chapman

unread,
Mar 16, 2012, 11:00:35 PM3/16/12
to jpl...@googlegroups.com
Cindy,

I've only recently implemented my first wordpress site.  So far, I've done very little theme adjustment...although I've done a reasonable amount of fine-tuning to a joomla template I used for a client.  I can't imagine it is any more difficult (or, any less likely) than with Joomla.

Just did a search...you may be better off with this depending on how complex your setup is:
(see 'feed a folder' section)

Alternately, you can cheat and use iframes.  Obviously, it is a hack.

On my wordpress installation, it looks like I can use the 'Appearance' > 'Editor' to 'Edit Themes'...which allows me access to the source PHP, I think?  I guess I could just FTP to the files, for that matter.  From there, you could 'include' the working demo, then strip out all the stuff you don't need from the demo page and, in theory, (assuming the folder directory stuff doesn't need to be moved) should work.

Hopefully, someone else can give you a better answer.  You'd probably be better off posting an inquiry on implementing a JPlayer Playlist in WordPress (new thread), doing that...then adding the PHP necessary to get my code working.

Just a thought.

I'm preparing to release the source for version 0.6(http://jplaylister.yaheard.us/v_0.6/), but it'll probably be another week or two.  Sadly, that version's code has been cleaned and commented/documented a little better...so it'd be a little easy to make changes / port / whatever.

Good luck.  Feel free to keep asking if we may be of more assistance.

nc

To view this discussion on the web visit https://groups.google.com/d/msg/jplayer/-/jOzDFzu4foEJ.

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.

nick chapman

unread,
Dec 19, 2012, 8:45:09 AM12/19/12
to jpl...@googlegroups.com
Mike,

Thanks for touching base.  Glad the code saved you time.  I'm always happy to hear about it being used.

Depending on how much you are trying to do with the script (and, how much you are having to modify it), keep an eye out.  The last update was planned for October, which has long passed, but it is going to be a pretty big one which adds some pretty useful features -- namely, caching (really helpful for larger playlists generated from id3 tag info), automatic album art lookup, code-base update (jplayer 2.2 -- maybe), and numerous bug fixes and minor updates.

Let me know and I'll make the files available as a pre-release or something.  If you aren't doing much, or won't make use of the new features...you're probably fine with what you have.

Take care!  If you use this on a public site, I'd love to see it in action.

nc




On Tue, Dec 18, 2012 at 6:05 PM, Michael Moore <imiked...@gmail.com> wrote:
I found this last night while searching for a way to generate a jPlayer playlist from a folder.  Your work saved me a LOT of time and I had it up and working in minutes.  Thanks so much taking the time to put it together AND share it.  Ill probably use it a lot more.

Mike


On Tuesday, September 21, 2010 10:18:02 PM UTC-4, Nick C wrote:
First, thanks to the developer(s) of JPlayer!  I've only used it
recreationally, but enjoyed how easy and straightforward it was to get
working.

While I enjoyed what the player could do inherently, I noticed that
playlists had to be manually created.  I'm lazy, and didn't feel like
doing that...as I wanted to make a 100+ song playlist for a <a
href="http://demo.chapmanit.com/jplayerPlaylist/?random=true">page I
made</a>.

Thus, I wrote some PHP which generated the necessary JS for a complete
playlist, requiring only the location of the folder with the music.  I
then added the ability to shuffle this generated playlist (which
orders by filename by default).  The generated playlist can use
filename information or, with the help of the <a href="http://
getid3.sourceforge.net/">getID3 project</a>, can pull playlist
information from the actual file.

I didn't try, but the playlist generator should work with other
filetypes (such as OGG) supported by JPlayer.

The code I wrote could be duplicated fairly easily by a competent PHP
coder, but I thought my efforts may be able to save someone some
time.  Please let me know if this could be helpful and I'll give the
code a home and make it available.  For now, I only have the demo
project: <a href="http://demo.chapmanit.com/jplayerPlaylist/">http://
demo.chapmanit.com/jplayerPlaylist/</a>

Post here or email me (thenickchapman[somewherecloseto]gmail.com

--
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/-/bzXKoybE-RYJ.

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.

Nick C

unread,
May 16, 2013, 2:54:06 PM5/16/13
to jpl...@googlegroups.com
[march 17th]
New version released:

  • revised code based on JPlayer v2.2.
  • added basic time-based caching for playlists. this drastically reduces load times for large playlists when used properly. see changelog (index.php when downloaded) for details.
  • added logic to collapse multiple files with the same name (except extension) to one Playlist entry, allowing JPlayer to pick the best file for the current browser.
  • added id3 sort by 'track' method and ability to force two digit track numbers and revised much of existing sorting logic. added a few configurable options.
  • added code to display the number of files in a (sub)folder for the filter list.
  • tons of fixes...
I'm hoping there will be another, smaller, update soon with a few features such as track auto-scrolling (will require static playlist height - code courtesy of Nick Putnam) and be based on jPlayer 2.3 and the current getID3.  I expect both of these would be drop-in updates, however.  I'll verify that.

Nick C
To unsubscribe from this group, send email to jplayer+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jplayer?hl=en.

ahmad.z...@imaniprima.com

unread,
Oct 24, 2013, 11:45:57 PM10/24/13
to jpl...@googlegroups.com
Thanks for your code. I just download and i try to my localhost, but i have get error:
Notice: Undefined index: debug in /opt/lampp/htdocs/jplaylist/index.php on line 242

Notice: Use of undefined constant submit - assumed 'submit' in /opt/lampp/htdocs/jplaylist/index.php on line 264

Notice: Undefined index: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 289

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 295

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 306

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 310

Notice: Undefined index: sortby in /opt/lampp/htdocs/jplaylist/index.php on line 316

Notice: Undefined index: makesparse in /opt/lampp/htdocs/jplaylist/index.php on line 322

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 344

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 399

Notice: Undefined index: artist in /opt/lampp/htdocs/jplaylist/index.php on line 1301

Notice: Undefined index: album in /opt/lampp/htdocs/jplaylist/index.php on line 1302

Notice: Undefined index: title in /opt/lampp/htdocs/jplaylist/index.php on line 1303

Notice: Undefined index: track in /opt/lampp/htdocs/jplaylist/index.php on line 1304

Notice: Undefined index: video_count in /opt/lampp/htdocs/jplaylist/index.php on line 1439

Notice: Undefined index: comments_html in /opt/lampp/htdocs/jplaylist/index.php on line 1301

Notice: Undefined index: comments_html in /opt/lampp/htdocs/jplaylist/index.php on line 1302

Notice: Undefined index: comments_html in /opt/lampp/htdocs/jplaylist/index.php on line 1303

Notice: Undefined index: comments_html in /opt/lampp/htdocs/jplaylist/index.php on line 1304

Notice: Undefined index: /songs/Ethan Durelle»090608_count in /opt/lampp/htdocs/jplaylist/index.php on line 1439

Notice: Undefined index: track in /opt/lampp/htdocs/jplaylist/index.php on line 1304

Notice: Undefined index: /songs/artist 1»album 1_count in /opt/lampp/htdocs/jplaylist/index.php on line 1439

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in /opt/lampp/htdocs/jplaylist/index.php on line 511

Notice: Use of undefined constant sortby - assumed 'sortby' in /opt/lampp/htdocs/jplaylist/index.php on line 514

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 530

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Notice: Undefined variable: filtered in /opt/lampp/htdocs/jplaylist/index.php on line 568

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 571

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 572

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: sortbyarg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 573

Notice: Undefined index: name in /opt/lampp/htdocs/jplaylist/index.php on line 574

Warning: Illegal string offset 'track' in /opt/lampp/htdocs/jplaylist/index.php on line 1168

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 645

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 645

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 645

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 646

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 646

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 646

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 647

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 647

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 647

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 648

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 648

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 648

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 649

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 649

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 649

Notice: Undefined variable: namearg in /opt/lampp/htdocs/jplaylist/index.php on line 650

Notice: Undefined variable: filteredarg in /opt/lampp/htdocs/jplaylist/index.php on line 650

Notice: Undefined variable: makesparsearg in /opt/lampp/htdocs/jplaylist/index.php on line 650

So, what can i do? Thanks for help me.
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.

nick chapman

unread,
Oct 25, 2013, 9:49:13 PM10/25/13
to jpl...@googlegroups.com
Those are all notices (not ACTUAL errors) as far as I can tell.  They are due to my haphazard (but, usually, effective) use of unitialized variables, specifically, not declaring empties or checking for isset($variable) before checking it for a particular value.  You should be able to change your php error reporting to only show errors as below:

from the php manual on error_reporting [http://php.net/manual/en/function.error-reporting.php]

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL E_NOTICE);
I'd use this one...add this code somewhere towards the top of the code or, better yet, set it in php.ini (I'll let you look up how to do that).

Basically, your development server seems to be encouraging you to code better by pointing out all the notices which shouldn't effect the overall script.

Under all the notices, you get nothing?  If you 'view page source' is it blank?  I'm wondering if it is a php version issue?

Hope this helps!

nc


--
You received this message because you are subscribed to a topic in the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jplayer/oXKQ2yWZ6Ys/unsubscribe.

To unsubscribe from this group and all its topics, send an email to jplayer+u...@googlegroups.com.

To post to this group, send email to jpl...@googlegroups.com.

Hermione Lion

unread,
Aug 26, 2014, 3:54:39 AM8/26/14
to jpl...@googlegroups.com
Hi Nick,

Congratulations on the simplicity and functionality of your player. I really like combination of functions that you've set up. While I understand that you've set it to call songs directly from a folder, I noticed that you mentioned that there was a way to easily modify it to call the data from a database instead.

Would it be possible if you could please explain how the songs from my database could be merged with your player?

I'm so close to finally getting this working, I'm hoping that you could please help me with this final step. :)

Thanks in advance.
Message has been deleted
Message has been deleted

Nick C

unread,
Aug 30, 2014, 11:15:48 PM8/30/14
to jpl...@googlegroups.com
[August 30th 2014]
New version of jPlaylister, v0.68 released:

  • revised code based on JPlayer v2.6(.4) and getID3 1.9.6.
  • added full-screen/mobile mode.
  • added auto-scrolling playlist when playlist height is set.
  • added sort options -- reverse of a couple existing ones.
  • added an argument to limit the # of playlist items (pagination may come next release).
  • added configurable js notification for android stock browser visitors since player usually doesn't work.
Happy playing!

Nick Chapman

Coby Randal

unread,
Dec 9, 2014, 5:25:17 PM12/9/14
to jpl...@googlegroups.com
This is exactly what I have been looking for! Thanks for sharing, Nick. :D
I think the Jplayer site should link/feature this as a helpful add-on.
I am really enjoying the new number limit for playlist items. Pagination
is going to be very helpful too. Thank you so much for sharing. I think this
is highly unknown and under appreciated, as I had to search high and low for it.

-Coby

nick chapman

unread,
Dec 10, 2014, 5:44:49 AM12/10/14
to jpl...@googlegroups.com
Thanks, Coby!  That is really encouraging!

jPlaylister was (is?) linked to from the jPlayer site, but probably not in a very prominent place since it is php based and jPlayer focuses on the javascript implementation of the code, mostly.  To be fair, they do all the hard work and enable all of the stuff my code utilizes, I just automate a few things here and there.  

You are only the 2nd or 3rd person who has shown much interest in pagination to go along with the max items code.  I'll try to bump it up a little in priority.

What did you finally end up searching for that caused you to find the jPlaylister code? Feel free to email me directly if you don't want to reply on the forum here.  Also, if you have a public implementation you wouldn't mind sharing, I always love to see how others have adapted the code and put it to use!

nc

--
You received this message because you are subscribed to a topic in the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jplayer/oXKQ2yWZ6Ys/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jplayer+u...@googlegroups.com.
To post to this group, send email to jpl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Panaghiston

unread,
Dec 10, 2014, 3:33:17 PM12/10/14
to jpl...@googlegroups.com
I made it a sticky in the group to help people find it.
Cheers Nick for the continued support :D
To unsubscribe from this group and all its topics, send an email to jplayer+unsubscribe@googlegroups.com.

nick chapman

unread,
Dec 10, 2014, 4:47:18 PM12/10/14
to jpl...@googlegroups.com
Thanks, Mark!  Additionally, thanks for all the work you do.  jPlayer just gets better and better!!!

To unsubscribe from this group and all its topics, send an email to jplayer+u...@googlegroups.com.

Coby Randal

unread,
Dec 17, 2014, 7:06:32 PM12/17/14
to jpl...@googlegroups.com
Hey Nick, thanks for the reply.

Yes it is a lot of work to keep things updated like that and to link everything,
especially a derivative work like this.

Lately, I have been trying to make an instance of the Jplayer playlister to
sit in a portion of my website. I initially thought of using an iframe or a php
include of jplaylister's index.php but I am having style problems and relative
url links breaking jplayer apart. Is there an easier way to do this? jplaylister
is working great in making the dynamic playlist out of a directory of mp3 files,
and now I want the player in the form of a simple audio playlist to sit inside
my web page. Can this be done? Have I overlooked something so obvious?

In the meantime, I see the jPlayer team have released a playlist add-on. My
two issue are trying to find a way to properly generate a playlist from a directory
or xml file, and then get that playlist add-on to read a generated playlist. They
don't show examples I am looking for... at least not yet.

I have been all over the net finding similar questions with broken, outdated,
and segmented answers. There has got to be an easy way to generate a playlist
file with PHP and link that playlist file to jplayer. So far, I am studying this stack
exchange post to see if I can make it work for me:

-Coby 

Andre Lefebvre

unread,
Sep 23, 2015, 3:13:54 AM9/23/15
to jPlayer: HTML5 Audio & Video for jQuery
Hey Nick,

I used to use the WimpyPlayer for my site but something happened that it stopped working for mobile and Mac devices. The Playlister is EXACTLY what I was hoping to find!! 

I have my music if folders, all the songs are numbered and ID3 tagged. It was a lot of work and would prefer to point the player to the folder like I used to do. Could you direct me to a tutorial of how to make the Playlister work with the JPlayer??

A ton of thanks for continuing development!

Cheers,

Andre

Nick C

unread,
May 27, 2018, 9:59:59 PM5/27/18
to jPlayer: HTML5 Audio & Video for jQuery
Just a check-in -- this project is still maintained, but doesn't get much attention...as it still works for my needs and I've heard no feature requests that I thought would be pretty widely wanted (and within my abilities).  

I released a version 0.70 a couple months after the last (listed) one, 0.68.  The only notable change was using jPlayer 2.8 instead of 2.6...and some more work on the "fullscreen/mobile" page...which mostly works on desktops, but is far from perfect on mobile.  There are some scaling issues with various screen sizes, though the code does still basically work as intended.

I'll try to work out the scaling issues and see if I can update the code to reference jPlayer 2.9.2 soon.

Oh, sometimes I reply to inquires via email (instead of posting here) if the answers don't seem like they'll help a wide number of people.

nc
Reply all
Reply to author
Forward
0 new messages