Did you know AmpJuke can scan a subset of your music collection ? Using the "last scanned" date makes scan+import run much faster. Read more.

Advertisement

What is "Now playing" and how do I configure it ?

What it is:

You can see what's currently playing and what's up next within the browser where AmpJuke runs.

If you like, the same information can be displayed in a small pop-out window.

"Now playing" was made possible by coding some AJAX functionality in AmpJuke.
Actually, the stuff returned to the browser is pure HTML, not XML, but the functionality relies on the 'standard' XMLHttpRequest.

Arguments aside: The stuff takes care of updating what's being played, - no page reload or any other user-action is required - that happens automatically. 

Enable/disable "Now playing" (personal setting).
If enabled, it's possible to allow the display of what's currently being played in a small area in the browser (below the menu in the left side), and/or show what's being played in a small "popout" window, so you don't have to switch back to the window/tab where AmpJuke is running.

 

I know a lot, if not all, media players these days shows what's being played.
But if you like an alternative to display what's being played in AmpJuke, you might consider "Now playing".

If the administrator (it might be you) have enabled "Now playing" in AmpJuke, you can turn this on/off on the personal settings page (Login -> Settings).


Unless you have administrator access to AmpJuke (or is curious!), you will not find anything interesting below this section.





Configuration of "Now playing".
The configuration of "Now playing" can either be done during installation, or later by logging in as a user with administrator access.
"Now playing" consists of 7 related parameters, some of them with two values.
Since this amount of parameters might seem overwhelming, there are some configuration examples below the following explanation:

Allow display of "Now playing": When checked, you'll allow each individual user to enable/disable "Display what is being playing" in his/her personal settings (login -> settings).
If this option is not checked (ie. display of "Now playing" is not allowed), the rest of the parameters will not have any effect - i.e.: You might stop reading further...
Default: On/checked.

Display album cover: When checked, a small album cover will appear (if you have one, of course) in the "Now playing" area. The small cover will also show up in the "popout" window.
Default: On/checked.

Reduce size of album images to: Enter the preferred width and height in the two fields.
F.ex. entering 25% and 25% will show an album image that's been scaled down to (you guessed it) 25%...
Absolute values are also valid, - f.ex. 100px and 100px.
Default: 100px / 100px.

Update interval: This setting determines how often the "Now playing" (and "pop-out" window) will have its contents updated/refreshed.
Note that the value is entered as milliseconds, so if you want an update, say, every 10 seconds, you should enter 10000 (ten thousand) in the field.
Take care when setting this value - if you set it "too low" (f.ex. 1000), your webserver will have to refresh "Now playing" once every second...
Consider how often it's really necessary to update, given the fact that music tracks typically lasts 3-6 minutes.
Default: 12000.

"Popout" window dimensions: Enter the preferred width and height (in pixels) of the dimensions of the "popout" window.
Default: 150 / 150.

Use "light update" on these media players: Enter a list of media players that should only see a "light" version of what's playing.
The "light" version of "Now playing" basically just shows the performer/group and the name of the track of what's being played currently.
So: No fancy album covers, no links to performer/group, album and/or year, when "light update" is turned on.
Each media player you want to use "light updating" on, should be entered separated by an asterisk "*".
See configuration examples below as well as a way to actually detect how your media player identifies itself (see bottom of this page)...
Default: MSIE*Windows-Media-Player*NSPlayer.

During Automatic play: Controls what should be displayed in "Now playing" when the last track you have selected has been played.
This will only come into effect, if you have
Automatic play (after last track) turned on in your personal settings.
There are two options.
Checking Continue updating "Now playing" will cause the "Now playing" stuff to appear as usual during Automatic play.
By not checking the "Continue updating..." box, you must enter some text in "Display this message", - f.ex.: Automatic play.
Please select some music.
or perhaps (if you like Dirty Harry): Go ahead, punk. Make your move, make my day !
Default: Playing random tracks.

 



Configuration examples of "Now playing".

Note: The more basic settings: "Display album cover", "Reduce size...", "Update interval" and "Popout window dimensions" are not included in these examples.
Of course, these fields should still have values...
Refer to the description of each above for an idea of what they're used for.

Example 1. Goal: Display what's playing for all media players, and display a message during automatic play.
Do this:
1. Check 'Allow display of "Now playing"'.
2. Clear whatever is present in 'Use "light update" on these media players' (basically leaving the field blank).
3. Don't check 'Continue updating of "Now playing".
4. Enter a message of your choice in the field 'Display this message'.


Example 2. Goals: Display what's playing for all media players except Windows Media Player (WMP), which just shows the "light update". Display a message during automatic play.
Do this:
1. Check 'Allow display of "Now playing"'.
2. In the field
'Use "light update" on these media players', enter: Windows-Media-Player*NSPlayer*MSIE
This effectively blocks WMP from the 'fancy' version of "Now playing", and - for all users using WMP - only show a "light" version of what's being played.
Other users (f.ex. those using Winamp), will still get "the full monty" in "Now playing"...
3. Don't check 'Continue updating of "Now playing".
4. Enter a message of your choice in the field 'Display this message'.


Example 3. Goal: Display what's playing for all media players, no matter what.
Do this:
1. Check 'Allow display of "Now playing"'.
2. Clear whatever is present in 'Use "light update" on these media players' (basically leaving the field blank).
3. Check 'Continue updating of "Now playing".
Warning: During testing, I found our that this might not be such a good idea...at least on my own box and when using Windows Media Player (WMP) as media player...
In fact this setting is equal to a "pre-0.6.6" setting, and is in general not recommended, but you might try it out on your installation - at least out of curiosity.


Example 4. Goal: Use the "light update" on all media players, and display a message during automatic play.
Do this:
1. Check 'Allow display of "Now playing"'.
2. In the field 'Use "light update" on these media players', enter: /*/
This should force all media players to use the "light update" when displaying what's being played (I believe all media players have a slash "/" included in their "ID"...)
3. Check 'Continue updating of "Now playing".

As you probably have realized by now, there are a lot of combinations/possibilities when configuring "Now playing"...
Go ahead and experiment to find out what's best for you and - if others are allowed access to your AmpJuke installation - your users.



How to find out what name your media player is identifying itself as.

This requires you to get your hands a little dirty in some code...
But don't worry ! It's actually quite simple.

Do this:
1. Open the file called "stream.php" in a text editor.
It's found within the folder where you installed AmpJuke.

2. Around the top of the file (line 14, or so), you'll see a line that is commented out:
//$display_user_agent=1;

3. Uncomment the line (by removing the "//"'s), so it looks like this:
$display_user_agent=1;

4. Save the file.

5. Turn on "Now playing" (see above...)

6. Play a track, and pay attention to the "Now playing" box located below the menu in the left side of the screen.
After a while a text will be displayed beneath what's being played.
For example:
"You user-agent (media player) is:
WinampMPEG/5.50"
...which tells you that you're using Winamp version 5.50 to listen to music...

WMP version 11 might show up as something like this:
"NSPlayer/11.0.5721.5145 WMFSDK/11.0"
...but it might as well show up as "Windows-Media-Player....".

7. If/when you don't need to see the name of the media player anymore, comment out the "$display_user_agent=1;" statement (see 2 above), save "stream.php", and you're back where you started from.

10-09-2010