Start address
Everything starts with your server’s /cfmedia/start.json file. That is what CF media looks for when the user types the address.
How the address becomes a URL
| The user types | The app fetches |
|---|---|
yourhost.com | http:/ |
192.168.0.10:8080 | http:/ |
https:/ or the https lock turned on | https:/ |
yourhost.com/ | the .json file given |
The start.json file
cfmedia/start.json
{
"name": "My Media",
"version": "1.0.0",
"parameter": "menu:{PREFIX}{SERVER}/cfmedia/menu.json",
"launcher": { "icon": "perm_media" }
}| Field | Required | Description |
|---|---|---|
name | check_circleYes | Name shown on the confirmation and splash screens |
version | Version of your content (informational) | |
parameter | check_circleYes | What to open (see below) |
launcher.icon | Icon (Material Icons) for the confirmation and splash screens | |
launcher.image | Image (URL) instead of the icon: your service’s logo |
tips_and_updates
The app fetches
start.json again every time it opens: changes on your server arrive by themselves. Without internet, it uses the last copy it received.The parameter
| Value | What it does |
|---|---|
menu:URL | Opens a menu (side menu + pages) |
content:URL | Opens a content page, without a menu |
redirect:URL | Reads another start.json and uses its parameter (up to 4 redirects) |
| any action | Runs it directly. Example: video:http:/ plays a video |
Variables
The app replaces these words in any URL in your pages:
| Variable | Becomes | Example |
|---|---|---|
{SERVER} | The address typed (with port) | 192.168.0.10:8080 |
{PREFIX} | http:/ or https:/, according to the lock | http:/ |
{PLATFORM} | Where the app runs | android, web, tizen, webos |
{LANGUAGE} | Language chosen in the app | pt-BR, en… |
{WIDTH} / {HEIGHT} | Actual screen size, in pixels | 1920 / 1080 |
{CLIENT} | App identification | cfmedia |
{PLAYER} | Player used | html5 |
{HOST}, {SECURE} | Where the launcher itself is (advanced use) | — |
{ID} | Always empty: CF media does not give any device identifier to servers | |