Page 1 of 3
Album cover on website
Posted: 26 Feb 2013 11:28
by rockdj
Hi Bernd,
I'm new at this forum. I have a question. Is it possible in PF that the album cover of the currently playing track is send along with the song info, so that it will be displayed in a webplayer on my website? e.g. like this
http://www.rockfiles.nl
Re: Album cover on website
Posted: 26 Feb 2013 11:28
by radio42
There is already a v4.0.4.19-beta out (use "Check for Beta-Versions..." to update).
This version contains a new control command called: EXEC_WRITE_JPEG_FILE, which writes any track's album art image to a file.
Parameters: filename[|from[|size]]
Note: The filename should denote the full path to a .jpg file; what can be '0'=current track (default), '1'=next track, 'A'=current player A, 'B'=current player B, 'C'=current player C, 'D'=current player D; size defined the quadratic with/height (default is 200).
Example:
Code: Select all
EXEC_WRITE_JPEG_FILE C:\Test\NowPlaying.jpg|0|300
Re: Album cover on website
Posted: 26 Feb 2013 12:24
by radio42
Yes, but that is not as easy as you think it might be
ProppFrexx contains several macros which can be used to 'send' a cover art image:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
These macros can be used exactly like any other existing macros which you might use to transmit the song title, artist etc. to your web-site.
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details
http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
Note, that above album art macros resolve the cover art image of an audio track (if existing) to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!
Re: Album cover on website
Posted: 26 Feb 2013 12:50
by rockdj
Thank you for your answer. I will try to fix it.

Re: Album cover on website
Posted: 10 Apr 2013 16:46
by rockdj
Hi Bernd,
I,m still trying to fix my problem. I already found, how to get the song info in my webplayer. But in wich command do I fill in this info:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
Could you help me along with this?
Best Regards!
Re: Album cover on website
Posted: 10 Apr 2013 17:14
by radio42
The above macros can be used with any control-command.
As said above...
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details
http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
And as said above, these macros are resolved to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
As a result the macro will resolve to a base64 encoded string containing the raw image data!
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!
So I am not sure what info you are actually missing.
Re: Album cover on website
Posted: 11 Apr 2013 20:40
by atlantic
Maybe this will help you.
<?php
echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >";
?>
Re: Album cover on website
Posted: 14 Apr 2013 11:09
by rockdj
Thanks for your answer! What I actually need to know is where excactly in PF do I fill in these commands.. I know that it's needs to be doen in de event/command section. But what are my next actions then?
Maybe someone could help me out with this..
Re: Album cover on website
Posted: 14 Apr 2013 11:34
by rockdj
Thank you Bernd,
But when I'm there, what's my next action?
I put an attachment with this message, so you can see my current situation.
Re: Album cover on website
Posted: 14 Apr 2013 13:44
by radio42
Not sure what more you are looking for.
When you placed those two commands e.g. with the "Streaming.OnSongTitleChanged" event and they are working fine...then you might have a file called 'test.html' on your web-site?
Is that working?
If not, what happens, if you open the file C:\Test\test.html locally within your internet browser?