Menu ▾ ▴

Setup_a_web_GUI

ZXED

Setup a web GUI

You will be able to control your server via HTTP requests. However, it will be more user-friendly to use web GUI for that case. Web GUI for MesonCast is designed with iUI targeting mobile devices.

To run it, you'll need HTTP server with PHP support (for example lighttpd), the latest PHP 5 module and MySQL server (for example MySQL Community Server).

You must setup all of the above by yourself, so read documentation on respective sites.

Web scripts for web GUI are located in /web subfolder of your applicatin folder. In case of OS X, web scripts wiil be located in /Library/Application Support/mesoncast/web folder. You may copy the contents from web folder somewhere under your HTTP server root folder. Alternatively you may just make an alias for that folder. This is a more convenient solution, because the web GUI will be automatically updated when you use an installer and there will be no need to copy files each time you upgrade. Read a documentation for your HTTP server on how to make aliases.

Next step is to prepare a database for a web GUI. You may either use an existing database or create a new. Run web/mc_setup.sql script in that database. This will create tables for a web GUI to use.

Open inc/settings.php.template and setup correct parameters in $CONFIG array:

Name Description Default value
site_name Page title that will be displayed on top of each page in your web GUI. MesonCast
db_host Database host name or IP address. localhost
db_user User with a full access to all MesonCast's tables. mesoncast
db_pass Password for db_user. castmeson
db_name Name of a database which contains MesonCast's tables. mesoncast
db_table_prefix Common prefix for MesonCast's tables (if you've used mc_setup.sql, then prefix is "mc_"). mc_
mesoncast_host Host name or IP address of MesonCast radio server. localhost
iuiEnhanced Reserved. Do not change this. false
max_search_results Maximum number of search results on a Search page. 50
max_nexts_results Maximum number of "Next X:" entires on Queue page. 10

Then rename that file to settings.php.

Before accessing the web GUI, you must run MesonCast. Note, that you will be only allowed to use your web GUI when MesonCast finishes its buffering.

You can only control one radio station (per browser session) at a time. At a login screen you'll have to enter station port and station password (as specified in TRANSMITTER.port and TRANSMITTER.controlPassword.

IMPORTANT:

  1. After submitting station port and password, web GUI will start to cache all station playlist information to a database. This may take a while depending on a size of your station playlist and your web server configuration. For example, it may take up to 1 minute to cache a playlist of 10,000 entries. You must not reload a web page during this process!

  2. Each time you change a station playlist, MesonCast will need to create a new cache for a playlist. So old caches will stay in database. These caches may take a big amount of your database space. You may need to clean up a cache from time to time. You can do it by pressing "Clean up cache button" on the home page of your web GUI. NOte, that this action will log you off the GUI.

Your web GUI will look like this:

Screenshot thumbnail
Web GUI: Playlist
Screenshot thumbnail
Web GUI: Search
Screenshot thumbnail
Web GUI: Queue
Screenshot thumbnail
Web GUI: File Operations
Screenshot thumbnail
Web GUI: Main window
Screenshot thumbnail
Web GUI: Retransmitting Internet-radio

This web GUI is pretty self-explanatory, but you may read about queues in a "Playback_queue" article.


Related

Wiki: Home
Wiki: Playback_queue