DigiVim.com
Home
About
Forums

Products:
MOD Jukebox

XML

Music on Demand Jukebox

Alert: As of March 3, 2005, the prismiq.org developer site has been down.

Development discussions have continued here.

  

Music on Demand is a client/server application I wrote to control the PRISMIQ MediaPlayer. The server was written in ANSI C++ and Berkley Sockets. The client is a Java Applet which can run in any Java 1.1 enabled browser.

The server runs on the same PC as the PRISMIQ MediaManager. It parses the PRISMIQ MediaManager's media file (media.xml) and connects to the MediaPlayer via the Media Agent. A client can then connect to the server and select songs to be queued.

The server supports two queues: high priority and low priority. Songs can be added to either queue by any client. The server will always look on the high priority list for the next song to be played. If the high priority list is empty, the low priority list is then used. This is a useful feature when entertaining. You can fill the low priority list to ensure that there is always music playing. Then, guests can use the high priority list like a jukebox.

Download (Version 0.2.0):
(Added album art, assignable TCP port, Java 1.1. compatability fixed?)

Download (Version 0.1.10):
(Added navigation history. Java 1.1 compatability is not fixed yet)

Download (Version 0.1.7):
(Added PRISMIQ playlist support)

Installation:
The server (ModServer.exe) should run on the same PC as the MediaManager. The most convenient location is the same directory as the media.xml and playlist.xml files. The default location for these files is:

C:\Program Files\PRISMIQ\MediaManager\gui
Once you've copied the server to your PC, it's installed (pretty easy, eh?)...but don't run it just yet.

Now for the client software. The client files are to be served by your web server. When you installed your PRISMIQ software, you also installed a web server...I'm going to assume that you'll use PRISMIQ's. The two client files are ModApplet.html and ModApplet.jar. Copy these two files to the web server's directory. The default location for this directory is:

C:\Program Files\PRISMIQ\MediaManager\webapps\mserver
Now the client is installed. There's one more setup step before we start the server. The Media Agent on the MediaPlayer settop must be turned on before the server can control it. Unfortunately, the only way to do this right now is to telnet to it, edit a file, and restart it.

To telnet to it, you must first enable telnet on the MediaPlayer. You do this from the user interface on the TV. From the main startup screen, select 'Setup'. Next, choose 'Advanced Settings'. Then, set 'Remote Access' to 'Enable'. And lastly, although I'm not sure if it's required, restart the MediaPlayer. I suggest actually pulling the power cord since the power button on the remote doesn't really restart the unit (it just turns off the screen).

Now we can enable the Media Agent. You'll need the IP address of the MediaPlayer. I would suggest picking your own static address through the MediaPlayer's 'setup' screen. Open a command prompt on your PC. Telnet to the IP address of your MediaPlayer (e.g. mine is 192.168.1.6):

telnet 192.168.1.6
You should get the login prompt. Login as 'root'. By default, no password is required.
C:\>telnet 192.168.1.6
Connecting To 192.168.1.6...

Linux 2.4.18-encore-11 (PRISMIQ) (0)


PRISMIQ login: root

BusyBox v0.60.5-1-encore-4 (2003.08.26-18:59+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#
Next change to the 'etc' directory:
# cd /etc
Next we have to edit a text file. The only text editor on the MediaPlayer is vi. If you're not familiar with vi, you'll find the commands kind of cryptic. Luckily, we don't have to do much to this file.

Open the magent.conf file with vi:

# vi magent.conf
Arrow down to the line containing:
CFG_MAGENT_LOCAL = 1
Arrow to the right to place the cursor under the '1' at the end of the line. Then press 'r' to get into replace mode and press '0' to replace the '1' with a '0'. The line should now look like this:
CFG_MAGENT_LOCAL = 0
Press the ':' key to get to the command prompt. Type 'wq' to write the file and quit out. If you made any mistake while editing the file and you'd like to quit without saving your changes, press ':' for the command prompt, and type 'q!' for force a quit.

Now the Media Agent can be run. The only way to start it (that I know of) is to restart the MediaPlayer again. You can do this from the telnet prompt by typing 'reboot'.

# reboot
Or, you can just pull the plug again. Now everything is installed and ready to go.

Running the server:
For starters, here's the help screen for the server:

ModServer <options>

Options:
--media <file>  = path to MediaManager's media file (e.g. 'media.xml')
--list <file>   = path to MediaManager's playlist file (e.g. 'playlist.xml')
--mp <ip>       = MediaPlayer's IP address
--mm <ip>       = MediaManager's IP address, as seen by the MediaPlayer
--debug         = Enable debug messages
--winamp <path> = Use WinAmp instead of the PRISMIQ MediaPlayer

Examples:
ModServer --mp 192.168.1.6 --mm 192.168.1.5 --media "C:\Program Files\PRISMIQ\MediaManager\gui\media.xml"
ModServer --media "C:\Program Files\PRISMIQ\MediaManager\gui\media.xml" --winamp "C:\Progra~1\Winamp\winamp.exe"
To run ModServer.exe, open a command prompt and cd to the directory you originally copied the application. By default, the server will look for the PRISMIQ files in the current directory, so the '--media' and '--list' options are not necessary. You will need the IP address of your PC as seen by the MediaPlayer. You can get it by typing 'ipconfig' at the command prompt:
C:\>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix  . :
    IP Address. . . . . . . . . . . . : 192.168.1.5
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1
So, in my case, the IP address for the PC is 192.168.1.5. The resulting command to start the server is:
ModServer --mp 192.168.1.6 --mm 192.168.1.5
If everything was done correctly, you should see something like this:
C:\Program Files\PRISMIQ\MediaManager\gui>ModServer --mm 192.168.1.5 --mp 192.168.1.6
ModServer version: 0.1.7
MediaContent: 1576 songs available
MediaContent: 126 playlists available
PrismiqControl: Connected to PRISMIQ MP
Main: Request server is up

Running the client:
To run the client, you can simply use any web browser on your network and go to the URL (address) for the ModApplet. With the default setup, the URL is:

http://192.168.1.5:8081/mserver/files/ModApplet.html
Of course, you would need to replace my IP address (192.168.1.5) with your own. Notice the extra directory name 'files' added to the path. This is a quirk of PRISMIQ's web server. The ':8081' is the default port used by PRISMIQ. If you changed the default, then use it instead.

The only gotcha is that many web browsers require you to lower the Java security to run the client. This is because it makes a network connection back to the server. To do this with Internet Explorer, go to the 'Tools' menu and select 'Internet Options'. Select the 'Custom Level...' button. Scroll down to the 'Microsoft VM' section. Change the 'Java permissions' to 'Low safety'. Then just select 'OK' to close out all of the dialogs.

If all is working, you should see something similar to this screenshot. Just press the 'Search' button as a quick check to see if it successfully connected. You should see a listing of your songs in alphabetical order.

If you have any problems or questions setting this up, feel free to contact me.

Support:
Please use the forums for support.