Streaming M3U

3,343 views
Skip to first unread message

Dean

unread,
Jul 19, 2010, 9:26:13 AM7/19/10
to jPlayer: the CSS styleable jQuery audio player plugin
Can anyone explain (bearing in mind I'm new to PHP and javascript) how
to get jPlayer to play an .m3u rather than MP3?

Thanks

Jon McLaughlin

unread,
Jul 19, 2010, 9:45:29 AM7/19/10
to jpl...@googlegroups.com
Dean,

I don't think you can play an .m3u file directly with jPlayer. jPlayer
itself only plays a single MP3 or OGG file. All of the playlist action
has to be done with Javascript. You could use PHP to open the .m3u,
read the contents, and output the individual MP3 files as some sort of
Javascript object.

The demos on the site with playlists have Javascript controllers to
play each song. That Javascript isn't exactly part of jPlayer, it's
just there to get you started. I always like to suggest you use
Firefox with Firebug, or even better (in my opinion) Safari's
Javascript debugger. Step through the demos one line at a time and
you'll see how it works.

..jon

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

Jon McLaughlin
System Werks
---------------------------------------------------
phone: (888) 750-7997
fax: (646) 405-4882
email: j...@system-werks.com
aim / ichat: j...@system-werks.com
---------------------------------------------------

Trygve Lie

unread,
Jul 19, 2010, 5:14:58 PM7/19/10
to jpl...@googlegroups.com
You can not play m3u files. m3u files are just a meta file referring to
the mp3 file(s). The HTML 5 spec does not cover such meta files.

This jPlayer demo displays how you can set up a play list:
http://www.happyworm.com/jquery/jplayer/latest/demo-02.htm

Hope that helps.

Kind regards
Trygve Lie
http://www.trygve-lie.com/


Reply all
Reply to author
Forward
0 new messages