Display currently playing song

79 views
Skip to first unread message

encoded

unread,
May 12, 2012, 11:46:30 AM5/12/12
to jPlayer: HTML5 Audio & Video for jQuery
Hi im using your excellent software to play an mp3 shoutcast stream
and i would like to know if its possible to display the currently
playing song/artist in a div, if not, please consider this a feature
request :)

the current version of my player is at:
http://www.electricdemonsradio.com/mediaplayer3/index.html

Crazy Zurfer

unread,
May 15, 2012, 1:26:19 AM5/15/12
to jPlayer: HTML5 Audio & Video for jQuery
Well, many people ask about this, even I would make it like a "hot
toppic", because the people asks but doesn't seach.

Here's the answer to all your problems:
https://groups.google.com/group/jplayer/browse_thread/thread/e35c306a1e08cfa9/eb725ce4067f0b2e?lnk=gst&q=current+song#eb725ce4067f0b2e

That's the page where I found this:
$("#jquery_jplayer_2").bind($.jPlayer.event.play, function(event) {
var current = myPlaylist.current;
var playlist = myPlaylist.playlist;
$.each(playlist, function(index, object) {
if(index == current) {
$("#theDiv").html(object.title + " - " + object.artist);
}
});
});
You must change $("#theDiv") for your div id.
Bye
Reply all
Reply to author
Forward
0 new messages