This topic has 17 replies, 7 voices, and was last updated 9 years, 1 month ago by sounds.
Viewing 18 posts - 1 through 18 (of 18 total)
Hi all,
I have a radio stream on ShoutCast (as supported by the theme), but the title, artist, and other metadata are not pulled in with ID3 tags to the player. How do I get MusicPlay’s player to recognize and automatically update the title, artist, and song duration with the metadata embedded in the ShoutCast stream?
Many thanks.
We are sorry, our Radio Streaming doesn’t support fetching the title, artists etc.,. But we’ll consider adding this feature in the coming updates soon.
Thanks Shailaja, I appreciate the reply. Do any of your formats support ID3 tags? (i.e. maybe not radio, but do djmixes or albums?)
Also, do you use http://jplayer.org/ as the player? I’ll probably need to write this myself, but wanted to confirm the player that I’ll need to tie into. If its not http://jplayer.org/ could you let me know which player you use?
Thanks!
Hi B,
We use jPlayer for the radio and jQuery Fullwidth Audio Player for the music player in the bottom which holds the albums djmixes etc.
As of now it supports only the meta data from the theme only not from the mp3 file metadata. But if you know you can write or make or write a code for that then I can provide you the script as well for the player which we use.
Script is there in the musicplay theme folder. IF you want to have a separate script please send me an email to envato@aivahthemes.com so that i can send you the file to email.
Topic is set to be resolved. If you wish to update this topic please reply here instead of creating another topic.
We have successfully been able to pull in the meta data from our shoutcast stream into the MusicPlay player, see here: http://gulsonpower.com/the80s/
We have also added code to reload the meta data every 30 seconds without it reloading the entire page and stopping the player.
I’m happy to share how we did this if anyone is interested. Thanks.
Its really good that you have implemented but thats ok the radio player I thought you were trying to pull that in the Fullwidth Audio Player. Anyway If you can share that would be awesome and we will consider adding that in the future releases.
Let me know if you have any more ideas so that we can implement that. We are considering the Radio Player design upgrade in the future releases. You have any idea on it please let me know or share any dribble shots if you have idea about it.
Regarding the code sharing you can’t upload php file so make it a zip file and attach that here or you can email us at envato@aivahthemes.com
Hello there mr Magoo..
I just bought the theme and I’m having the same problem as you were. I’m not smart as you though, so I can’t make a code on my own to solve that problem. You said you will share with someone who needs it. That’s me!!
I’d like to ask you about another question regarding plugins if you could.
This is my skype: mateus.bnunes
mobile +55 67 9130 8878 (for apps like whatsapp)
Thanks!! I hope you reply soon.
Hi there mrmagoo2012,
I too would be very interested in seeing your code. Did you use the full width audio player (used for album mode) or jplayer (used for radio mode in the theme)? I also wrote some JS to update the metadata in the player, but I’m using the full width audio player because we need to have our live stream and album functionality. I’m finding full width audio player difficult to work with because:
(1) Livestream active detection: Meta data should only be updated when the livestream is playing or paused. When on demand (MP3s uploaded to albums in the theme) is playing, we don’t want to replace that meta data with shoutcast’s.
(2) Pausing a livestream: When a livestream is paused in full width audio player, it actually pauses the music. When the user presses play again, it restarts from the point at which it was paused, rather than resuming with what’s currently live. (That’s a metadata problem, of course, as well, because the metadata keeps showing what’s live out of sync with the audio.)
Not looking for someone else to solve all my problems, but I’d love to see your code if you can upload it to the forum, and would welcome any thoughts from anyone on the above.
Thanks!
Hi all,
Apologies for the delayed response.
OK, as I can’t upload the ZIP here as there is a 3MB limit, the file is 11MB, I’ve uploaded it here for you to download: http://the80s.com.au/shoutcast-data.zip. The ZIP contains the files etc you need to update/replace. PLEASE backup your files, I will not be responsible for anything that you may do to mess up your site.
This is the working URL where I have the Shoutcast now playing pulling in with the MusicPlay theme: http://the80s.com.au using the radio player at the base. We have also included a refresh that reloads just the player data every 30 seconds.
I have styled things and disabled some features that suited us. You will also see I also have a ‘Now Playing’ and ‘Just Played’ section on the homepage that also calls on the Shoutcast data and also brings in artist artwork from LastFM using their API.
The supplied ZIP and files “I HOPE” is everything I did, I didn’t keep the strictest of notes, so if you install and it doesn’t work first go, feel free to contact me here and I’ll try and work with you to resolve what I may have missed, but saying that it should be good.
There are some setting files (now-playing.php | player/now-playing.php | shoutcastinfo/settings.php) that require you to put in your Shoutcast IP details etc, and your LastFM API is you use that. See how you go.
1. Upload the folder and all contents of the ‘shoutcastinfo’ folder in the ZIP to your site root (where your wp-admin / wp-content etc folders also are)
2. Upload the folder and all contents of the ‘player’ folder in the ZIP to your site root (where your wp-admin / wp-content etc folders also are)
3. Upload/replace the following files in your theme folder /wp-content/themes/musicplay (now-playing.php, player.php, radio-player.php) *remember backup if replacing
Regards
Mr Magoo (Adam)
Thanks, Adam!
I needed to use the fullwidth audio player (the one used for Albums, in the theme), because we wanted to have live radio playable alongside albums and dj mixes. So what I did was:
(1) To get live radio in fullwidth audio player: Uploaded an MP3 to an album, then manually changed the GUID for that upload to my stream URL in the SQL database (using phpMyAdmin). I did that because one can’t actually “Upload” a livestream, and I wanted it saved in the media library to easily add to pages. I probably could have done this more easily by just providing my stream URL as an “External MP3” media type in an album.
(2) To get live radio to pick up with whatever is currently live after resuming from pause: By default, live radio will start playing again from the point at which it was paused, like a normal MP3. We don’t want this; when a user hits play we want them to hear what is currently live. I used (and modified) the following to do that:
$('#fap').bind('onFapPause', function(evt, trackData) {
$.fullwidthAudioPlayer.clear();
$.fullwidthAudioPlayer.addTrack('[STREAM URL]', '[Song Title]', '[Metadata (Artist / Album)]', false);
$('#fap-play-pause').removeClass('fa-pause').addClass('fa-play');
});
I found FAP player pretty easy to work with, once I found its documentation online. (See http://cc.radykal.de/fullwidthaudioplayer/doc/index.php & http://www.pronoteapps.com/fbapps/pronotebeatport/_OLD/fullwidth/documentation/ReadMe.html
(3) Get Shoutcast metadata in place: This was just a matter of pulling data from your broadcast source, which will be sufficiently different for every setup. See Mr. Magoo’s code above for further guidance. Basically, I have SAM broadcaster upload a file containing all of the metadata to my site using FTP. I have a PHP script read that file and rewrite it in a JSON format. I then have the theme refresh that JSON feed every X seconds. When the data changes, I update it in the player. I just used the theme’s default classes, and overwrite their metadata. Again– FAP (fullwidth audio player) doesn’t use too much funny logic or anything. It’s pretty straightforward, and you’re pretty safe just overriding content with jQuery.
All that to say: this will take some development, but I probably did the whole thing in ~5 hours, and I’m not brilliant. So its very doable if anybody’s trying.
As for the theme developers: most of this could easily be built in. I’d recommend doing away with the different audio player modes– FAP can be used for live and stored audio together, no need for jPlayer separately.
Hi Sounds,
Basically, this is a recap of my previous post, which is a little more in depth.
I can tell you I never figured out how to strip ID3 tags from a SC stream (I believe it was deemed impossible, at least for our setup). We broadcast from SAM broadcaster though, which supports outputting a metadata file locally or via FTP, using a custom template. So I made a custom XML template for SAM, and it FTP’s that feed of metadata to a webserver on every song change. I then wrote javascript to check that XML file URL every 10 seconds for changes, and if found (aka if the track has changed), it overwrites the existing metadata on the page. All of this has worked smoothly for us for months, though its worth noting that there’s about a 20 second delay between when the FTP file drops and when the song is actually heard (as in, metadata updates 20 seconds before song starts playing), so I just had to build a delay in. Easy enough, but that coupled with the 10 second check interval makes this a highly imprecise system. Usually it updates properly within about 5 seconds of song change, which is sufficient for our purposes, but if you needed more precise data you could:
One other issue if you’re broadcasting live is that when a user presses pause, then play again, it resumes playing from the point at which it left off, not the currently live moment. That will certainly throw off your metadata syncing, and may be undesirable for you more broadly. To get around this, I hijacked the pause button, and triggered a jPlayer .clear() when pause is clicked (to turn it into more of a ‘stop’ button). That means when the play button is clicked, it loads the stream fresh, at its current point.
One last resource: jPlayer has some helpful tutorials, which this theme is built off of (well, that or “full width audio player” which is based on jPlayer).
Bottom line: none of this is supported by the theme and ShoutCast has extremely mediocre resources online. But if you can get your metadata exported in some sort of usable format, its not too hard to do this custom in jQuery with ajax calls.
(I do hope this is all incorporated into the theme– I felt it was a misnomer, and was disappointed when I bought the theme.)
Hope that helps! Good luck.
Viewing 18 posts - 1 through 18 (of 18 total)
You must be logged in to reply to this topic.