Basic Application Programming Interface (API) 

           Version 1.0 
 
 

Axonix Corporation

844 South 200 East

Salt Lake City, Utah  84111 

Phone:      801.521.9797

Fax:           801.521.9798

Toll Free:          800.866.9797

Web Site:   www.axonix.com 
 
 
 

                                                                                                                                                        MM-API-01

Axonix MediaMax

Basic API as Excerpted from Administrator’s Guide

41004511

© Axonix Corporation 2004 

All rights reserved.

No part of this manual may be reproduced or transferred to other media without explicit written permission from Axonix  

Basic MediaMax API 

Disclaimer Notice: The following MediaDeck GUI Application Programming Interface (API) information is preliminary and is subject to change without notice. Axonix Corporation has written this API specification to the best of its knowledge, but does not guarantee that the programs/systems will fulfill the users’ intended applications. All contents of this document is provided "as is" without warranty of any kind, either express or implied, including, but not limited to, implied warranties of ownership, accuracy or fitness for a particular application. 

Axonix shall not be liable for any indirect, incidental, consequential or punitive damages that may arise from the usage of the information in this document.  The information provided in this document may be used in software projects and these projects may be distributed freely either in source or object code form as long as the software project is targeted at the Axonix MediaMax product.  Information in this document may not be used for any other purpose; in particular, it may not be used in projects that support products by other manufacturers. (c) 2004 by Axonix Corporation;  (c) 2004 by Pinnacle Systems Inc. – Portions (c) 2004 by Syabas Technology Sdn. Bhd. All rights reserved. 

Table of Contents 

Introduction

Overview

Browser

-Navigation Specials

-Playlists and Playback

Settings

-Box CGI´s

-UI Settings

TV-UI Structure

-Skins

-Languages

-IR Remote Control Codes 
 
 
 
 
 

Introduction 

The MediaDeck Graphical User Interface API provides the software programming interface necessary to program a remote controller to control a MediaDeck.  This method depends on the User being able to view the GUI including the PlayLists being displayed on the MediaDecks’s attached display (TV etc.).  This remote control method does not provide a way to import the MediaDecks’s Media PlayLists etc.. 
 

This section describes the most important details you need to understand how the

components of the MediaMax (MediaServer (MS) and MediaDeck(MD)) work together and how to create your own User Interface Modules (UIM).

The Playback of movies and other media is accomplished by the MediaDeck (MD) which is also referred to as the “the Box”, “Set-Top” or "Player".  Its job is to establish the connection between the MediaServer across your home LAN and your TV and other home theatre audio components, decode the movie or other media file and deliver it to the home theatre system. 

This Software Development Kit (DK) includes some examples you can store into the DocRoot of the MediaServer your own custom HTML Web pages by replacing the “index.html” file and browsing to it with your MediaDeck.

Add the other Files and Folders to your existing installation. You don’t need to replace other files, than the first “index.html”.  Take a look at the HTML Sources for better understanding how the MediaDecks specialized functions are working.

All information refer to MediaDeck Software Release 1.5 incl. Box-Firmware Version "05-95...". 

1. Overview 

The Software for the MediaMax Product can be separated into tree logical areas. 

[SC - Player Hardware with firmware] 

use HTTP (Port 8000) protocol from the box to the SC-Server PC

also use uPnP (Port 1900) for automatic box detection 

[SC - Streaming Server] (with PHP based HTML generation) 

use COM interfaces 

[SC - MediaServer] ... [SC - Application to manage media files] (not described

in this SDK) 

The firmware of the SC-Player contains a small HTTP browser with special (proprietary) tags to handle the video/audio and photo streaming. The streaming itself simply based on HTTP protocol.  The SC-Streaming Server is a small HTTP server with some special extensions. Here is a list of extensions. 

- parental control: the server makes a crosscheck to the MediaServer to verify if the client has the right to access the requested data. 

- photo handling: instead of the original (large) photo to the SC-server send a rotated, downscaled, filtered and color corrected copy of the original image to the SC-Player. 

- timeshift playback: the server detects "currently growing" files like from a TV show recording and updates the size in the MediaServer’s ShowCenter Player

- new media detection: if anything new is imported into the MediaServer database the server will blink the "New Media" light on the SC-Player for about 10 seconds. 

The ShowCenter “SC” module is the basic media content management software module on the Server.

It handles for example "Watched Folders" and provides the interfaces to access the

MediaServer Database. 

2. Browser 

2.1 Navigation Specials

The Box is running a web browser which is able to display simple HTML 4.01 sites. There is no support for Java, Javascript, Flash or other multimedia Plugins. The used protocol is TCP/IP.  The Box-UI is a set of HTML Sites created by a php enabled webserver running on PC´s side. This Server asks the media database for the needed content and generates the UI Output.  To guarantee a simple to use UI the browser has some non HTML 4.01 conform functions.  These functions are like a very simple set of helpful Javascript like Tag  

Attributes: 

2.1.1 OnFocusSrc

Load alternative image when receive focus

<A HREF="foo.htm">

<IMG SRC="image1.jpg" ONFOCUSSRC="image2.jpg"></A>"

NOTE: For “image2.jpg” don’t use transparency. Otherwise “image1.jpg”

would not be covered completely! 

2.1.2 OnFocusSet ... (Focus)

Jump to other link with specified name when receive focus

<A HREF="foo.htm" onFocusSet="example"></A>"

<A HREF="fighters.htm" name="example"></A>"

2.1.3 onLoadSet ... (Focus)

Set focus to defined item on load page.

<BODY onLoadSet="MyFocus">

<A HREF="fighters.htm" name="MyFocus"></A>" 

2.1.4 onFocusLoad ...

Load any URL on focus set.

<A HREF="any link" onFocusLoad="MyUrl.php?Param=1"></A>"

The second type of these helpful Tag Attributes is some functions to specify PiP handling and some form specials, placed in the header of the HTML Code: 

2.1.5 meta myibox-pip

Positioning the PiP window

<meta myibox-pip="64,64,320,240,1">

Where

64: Offset x from screen

64: Offset y from screen

320: Width of the Window

240: Height of the Window

(Please noted that all the value MUST BE quantum of 16)

0/1: Start play in fullscreen / PiP mode

2.1.6 meta SYABAS-FULLSCREEN

Hide Syabas bottom menue

<meta SYABAS-FULLSCREEN>

2.1.7 meta SYABAS-AUTOSUBMIT

By enable this, it will submit the form automatically when user input character in the

input field. This feature will be turn off automatically when browser didn't see <meta

SYABAS-AUTOSUBMIT> in HTML.

<meta SYABAS-AUTOSUBMIT> 

2.8 meta SYABAS-KEYOPTION

Tag to set caps lock, num lock and lower case for input field.

<meta SYABAS-KEYOPTION="num">

<meta SYABAS-KEYOPTION="caps">

<meta SYABAS-KEYOPTION="lowercase">

Another useful Tag attribute is one to define the extension of a link high-lite: 

2.1.9 Hi-Lite link extension

Specify hi-lite extension for link tags.

<a href="" STYLE="WIDTH:200">

2.1.10 Customise Hi-Lite Color

<BODY FOCUSCOLOR=”#FF0000” FOCUSTEXT=”#FFFFFF”>

This will change the hi-lite color to RED color with WHITE text. 

2.1.11 TVID

This feature provides an easier user navigation on the browser. User can interact with

the browser through remote control with minimum key strokes.

Example: <A HREF=”http://example.com” TVID=”X”>

Where “X”: A value between 0 – 999 or one of the following special remote button

names:

PGUP, PGDN, key_a, key_b, key_c, help, music, movie, photo, home, backspace

This attribute is supported in links only.

.

Defaults of A,B and C Buttons:

A = Serverselect Startpage

B = Box Firmware Settingspage

C = Enter URL

2.1.12 “FURL” (FocusURL) 

2.1.11 TVID -continued 

FURL is a none standard browser extension to get the current focus position

(highlight) as a parameter to the next page request of the browser. It is only

supported together with the following "TVID" values: key_a, key_b, key_c. 

Example: // your html page

...

<A HREF=”WhereIsTheFocus.php” TVID=”key_a”>

...

<A HREF=”HereIsMyFocus.php?MyParam=AnyParam”>

...

When the user navigate to the "HereIsMyFocus.php" link and press "A" on the remote

the browser start to load the link

"WhereIsTheFocus.php?FURL=HereIsMyFocus.php%3FMyParam%3DAnyParam". 
 
 

2.2 Playlists and Playback 

Supported Video Formats:

- MPEG 1 VCD format (1150Kbps CBR) (.mpg,.mpeg, .dat)

- MPEG 2 up to 9.5Mbps (.mpg, .mpe, .mpeg, .dat, .m2v, .vob)

- MPEG 4 (DivX4/5, XviD, RMP4) (.avi, .divx, .xvid) 

AVI audio codec : MP3, AC3, PCM, WMA, Ogg

Like the specials for navigation there are some similar ones to handle the playback

behaviour of the box: 

2.2.1 Movie Playlists - VOD Browser Tag

2.2.1.1

<a href="http://sample-domain/sample.mpg" vod>Sample Movie</a>

Play sample.mpg to the end. 

2.2.1.2

<a href="http://sample-domain/sample.txt" vod="playlist">Sample Playlist</a> 

Play sample.txt playlist.

sample.txt format: "Movie Title","reserved","reserved","Movie URL", 

Example:

Star-Shrek,0,0, http://sample-domain/star-shrek.mpg,

Troys Story,0,0, http://sample-domain/troys_story.mpg,

The above playlist will play 2 movies from begin to end. The two “reserved” entries

must be set to “0”. 

2.2.1.3

<a href="http://sample-domain/sample.mpg" vod="pctv">Growing Movie

Sample</a>

<a href="http://sample-domain/sample.txt" vod="pctvpl">Playlist with Growing

Movie Samples</a>

These vod tags work like the previous ones but it is possible to tell the browser a new

size for the currently loaded file (see pctv_update.cgi). 

2.2.2 Music Playlists - AOD Browser Tag

Supported Audio Formats:

- MPEG I Layer 2 (MP2) (.mp2)

- MPEG I Layer 3 (MP3) (.mp3)

- Ogg Vorbis (OGG) (.ogg)

- AC3 5.1 (AC3) (.ac3)

- Microsoft PCM Wave (WAV) (.wav)

- Microsoft Windows Media Audio version 1 and version 2 (WMA) (.wma) 

2.2.2.1

<a href="http:// sample-domain/sample.mp3" aod>Sample MP3</a>

Play sample.mp3 to the end. 

2.2.2.2

<a href="http:// sample-domain/sample.txt" aod="playlist">Sample Playlist</a>

Play sample.txt playlist.

sample.txt format (same syntax as movie playlists):

"Song Title","reserved","reserved","Song URL", 
 

Example:

Unknown Artist - music,0,0, http://sample-domain/music.mp3, 

Any title for the song,0,0, http://sample-domain/more music.mp3,

"Song Title" is the text that is shown in the OSD. The "reserved" fields must set to

"0". 

2.2.2.3

<a href= ”http://sample-domain/sample.mp3">Sample MP3</a>

Play sample.mp3 to the end over Internet. 

2.2.3 Photo Slideshows - POD Browser Tag

Supported Photo Formats:

- JPEG 

2.2.3.1

Use the tag <a href= ”MUTE" pod="Reserved, Start Picture, URL">My Photos</a> to

show a photo slideshow without music.

Example:

<a href= ”MUTE" pod="1,0,http://sample-domain/sample.txt">Slide Show without

music</a>

"Reserved" must be set to "1".

"Start Picture" is the index into the slideshow (playlist) where to start display ("0"

start with the first picture in the list). 

sample.txt format:

"time","transition","title","URL", 

Example:

3,0,My Garden, http://sample-domain/DSC_1234.jpg,

5,4,My House, http://sample-domain/DSC_1235.jpg,

"time" defines how long the photo will be displayed. It is an approximate value in

seconds.

"transition" defines the selected transition (see list below).

"title" is the text for the photo displayed in the OSD.

"URL" is the complette path to the .jpg photo 

Transition effects available for slideshows:

Effect Number

Random 0

Wipe Down 1

Wipe Up 2

Open Vertical 3

Close Vertical 4

Split Vertical 1 5

Split Vertical 2 6

Interlace 7

Fade to Black 8 

2.2.3.2

To add a music playlist to the photo slideshow please replace the keyword ”MUTE"

with the url of a music playlist (see section Music Playlists).

Example:

<a href=”sample-domain/music-pl.txt" pod="1,0,http://sampledomain/

sample.txt">Slide Show with music</a> 

3. Settings 

3.1 Box CGI´s

To understand, how all Parts of MediaMax work together, you have to distinguish between the MediaDeck’s Firmware itself and the UI generated by the PHP enabled Webserver on the MediaServer. 

For example:

The Server-Select Page appearing, when turning on the Box is implemented in Firmware. 

The Pages to “ADD”, “REMOVE” and “EDIT” Servers are as well Part of the Firmware.

Pressing the “B” Button on your remote takes you to the “raw” Settings [OPTIONS, IP

CONFIG, WIFI SETUP] of the Box. This is a part of the Firmware too. 

Everything you see after you confirmed to connect to one of the Servers listed on the

Server-Select Page, is generated by the MediaServer. 

To guarantee a constant “Workflow” there are settings pages in the UI, to change the most important Firmware options and some others, which just affect the UI generation. To establish a way of communication between the MediaDeck (Settingspages) and the Http-server running on the MediaServer, there is another little Http-server running on the MediaDeck at Port 2020. This server can be connected by any other client in the network to get and set some Boxparameter

like "screen saver time". 

Here is a simple example:

http://BoxIP:2020/preferences_cgi.cgi?_scr_saver_time=20

Calling this link would set the Screensaver delay to 20 minutes.

The “_” is required for the box to accept that changes.

NOTE: _ => HEX code value 0x7F or 127 decimal.

3.1 Box CGI´s -Continued 

You although can change more than one setting with one call:

http://BoxIP:2020/preferences_cgi.cgi?_scr_saver_time=20&_display_option=05& 

This additionally would set the video output to “Component PAL”. For the other Video

Options, take a look below. 

On the following Pages you get the complete Set of Options that can be changed with this mechanism. 

3.1.1 Preferences CGI 

Parameter Description Value Range

_scr_saver_time Time before screen saver kicks in 1 to 60

_display_option Video Setting

01 : S-Video NTSC

02 : Component NTSC

03 : Scart NTSC

04 : S-Video PAL

05 : Component PAL

06 : SCART PAL

07 : HDTV Component 480P

08 : HDTV Compoentn 720P

09 : HDTV Component 1080i

10 : VGA 1024 x 768

19: Component PAL Progressive

_videozoom_option Video Zoom

00 : Fit To Screen

01 : Full Screen

02 : Actual Size

03 : 4:3 Letterbox

04 : 4:3 Pan And Scan

05 : 16:9 Widescreen 

_type_snd Typing Sound

include "_type_snd" in parameter will

turn ON typing sound and vice versa

_nav_snd Navigation Sound

include "_nav_snd" in parameter will

turn ON navigation sound and vice

versa

_alert_snd System Alert Sound

include "_alert_snd" in parameter

will turn ON system alert sound and

vice versa 

Example call:

http://BoxIP:2020/preferences_cgi.cgi?_scr_saver_time=20&_display_option=05&_type_snd&_alert_snd 

3.1.2 New Media LED

At the front of the Box you see the “New Media LED” blinking, if New Media was imported into the Database. 

To get this LED working use the following example:

http://BoxIP:2020/LED_indicate.cgi?_StatusLED=ON

This call will turn the LED on to a constant shining. 

Use “StatusLED=OFF” to turn it off again and with “StatusLED=BLINK” you turn it to

blinking. 

3.1.4 File Size Update 

This command only make sense together with the vod="pctv" and vod="pctvpl" attribute for urls. 

* HYPERLINK "http://BoxIP:2020/pctv_update.cgi?_filesize=42000" **http://BoxIP:2020/pctv_update.cgi?_filesize=42000* 

This call will tell the box browser that the size of the currently loaded file have increased to 42000 byte. You can call this cgi from time to time to keep the box streaming a currently growing file (used for timeshift playback). 

3.1.5 Browser Refresh

You are able to refresh the Box-Browser by sending the following to the box:

* HYPERLINK "http://BoxIP:2020/refresh_browser.cgi" **http://BoxIP:2020/refresh_browser.cgi* 

3.1.6 Direct Access to Box Settings

To access the Box Firmware Settings direct from the Box UI, call the following from the Box Browser: * HYPERLINK "file://syabas18.htm/" **file://syabas18.htm/* 

to go back to Server-Selection Page (Add Server, Edit Server, Delete Server)

* HYPERLINK "file://syabas11.htm/" **file://syabas11.htm/* 

to get access to the MediaDeck firmware settings page (Options, IP-Config, WiFi-Setup)

4. TV-UI Structure 

4.1 Skins

The TV-UI of the ShowCenter is designed to be skinable. That means you will be able to create own Skins, like the new ones since Software Version 1.5 RC1 Beta, that have to follow some simple guidelines. 

If you take a look in your MediaServer based “ShowCenter” Installation Path, you will see the two folders

“DocPath” and “DocRoot”. 

The DocRoot contains all files a browser will see if it´s pointed to the MediaServers Address, like “http://localhost:8000” for example. 

DocPath contains all configuration files, in the form “example.inc.php”, that are needed by the PHP-Scripts. 

4.1 Skins --Continued 

One of the Subfolders in DocPath is the “Skin”-Folder, with further subfolders, including the Skin-Files. These files consist of one PHP-File called “Name.inc.php” and the graphics for the UI. 

4.1.1 UI “Name.inc.php” 

First, lets explain the “Name.inc.php”  

<?PHP

global $g_SkinName, $g_UIColor, $g_UIBtnFontName, $g_DynTableAlign, $g_DynTableWidth;

$g_SkinName = "Earth XL";

$g_UIColor = array('LINK'=>"#FFFFFF",

'FOCUS'=>"#FFFF33",

'BGR'=> "#003366",

'DEF_BTN_BGR'=>"#C9CED4",

'IMG_TXT'=>"#FFFFFF",

'HTML_TXT'=>"#FFFFFF",

'HTML_TXT_FOCUS'=>"#000000",

'AUDIO_BGR'=>"#C68F8F",

'VIDEO_BGR'=>"#8F8FC6",

'PHOTO_BGR'=>"#8FC68F",

'SETTINGS_BGR'=>"#999999",

'WEB_BGR'=>"#999999",

'TV_BGR'=>"#AFAFF6",

'TEXT'=>"#000000");

$g_UIBtnFontName = "arialbd";

// ---Dynamic tables alignment settings ---

//supported descritors: 'Default',

//supported alignments: "left"(default), "center", "right"

$g_DynTableAlign = array('Default'=>"left");

global $g_xLatImgNameEx;

$g_xLatImgNameEx = array(IMG_MAIN_BGR=>"Sunset.jpg");

$g_DynTableWidth = array(30,152,1,1,362,40); ?> 
 
 
 
 
 

4.1.1 UI “Name.inc.php” - Continued 
 

“$g_SkinName” sets the name for the Skin, which is shown in the UI. This can be similar to the Folder-Name in which the UI-Files are stored, but that is not recommend. 

The “g_UIColor” Array contains all UI Colors, that are part of the HTML Page.

“g_UIBtnFontName” sets the Windows TT font, which is mapped onto the buttons.

“g_DynTableAlign” sets the alignment of the content table (right area of the TV-UI).

“g_xLatImgNameEx” is an array to overwrite the default filename for any graphic in the UI. 

In this example (IMG_MAIN_BGR=>"Sunset.jpg") the filename for the background is set to the file "Sunset.jpg". The complete list of used images can be found in the file

../DocPath/classes/main.inc.php (see define ("IMG_MAIN_BGR", 9000); ff).

“g_DynTableWith” defines the with of each column of the content table. 

In this example that means the following:

- left border = 30px

- left static menue = 152px.

- spacer one = 1px

- spacer two = 1px

- content column = 362px

- right border = 40px

30px 152px 1px 1px 362px 40px 

Left Menu Right Content Menu 

With this Table Construction you are able to choose the weight between static left menu and the dynamic, content menu. Be sure, that the sum over all is not bigger than 586px, otherwise the table would “bounce” on the screen while navigating on the UI. 

4.1.1 UI Graphics 

First of all here is a list of the current UI Graphics, that should be part of each Skin: 

File Size

Bgr_full.png 624 x 416

Btn_a.png 180 x 25

Btn_access.png 152 x 30

Btn_all_media.png 152 x 30

Btn_arrow_down.png 30 x 30

Btn_arrow_right.png 30 x 30

Btn_arrow_up.png 30 x 30

Btn_b.png 180 x 25

Btn_c.png 180 x 25

Btn_default.png 152 x 30

Btn_enter.png 152 x 30

Btn_music.png 152 x 30

Btn_ok.png 52 x 30

Btn_PC-TV.png 152 x 30

Btn_photo.png 152 x 30

Btn_settings.png 152 x 30

Btn_star.png 28 x 30

Btn_video.png 152 x 30

Transparent.png 2 x 1

All included Button Graphics are PNG8 compressed with 216 Colors and one indextransparent color. 

4.1.1 UI Graphics 

The MediaDeck supports JPEG compressed Graphics (16 Million Colors) as well, but this is not recommend because it would decrease the UI-Performance. 

4.2 Languages 

The second important part of the TV-UI is the Language localization. In the “DocPath” folder of the ShowCenter Installation, you will find a “Lang” Folder which contains the language specific Subfolders. 

All language subfolders contain the complete set of text, that is needed for the TV-UI.

If you want to replace the default text by alternatives take a look into this files and you will find each section by its name. You are welcome to create translations for languages we do not support right now. 

NOTE: There is no unlimited space for the text menu items you define in the language files. So you have to shorten a little bit, if some text becomes to long.

For the Menu title on the right side, you can use a double-backslash “\\” to provoke a line break. 
 

5.0 MediaMax IR Remote Control Codes