Skip to content
CF MEDIA

Actions

An item’s action says what happens when the user presses OK (or taps). The format is type:value.

All actions

ActionWhat it does
video:URLPlays the video in the player. The item’s title, footer and image appear in the player
audio:URLPlays the audio in the player, with the item’s image as the cover
image:contextEnlarges the item’s own image. ◀ ▶ go through the other images on the page
image:URLEnlarges the given image
content:URLOpens a page (Back returns)
panel:URLSame as content:
menu:URLOpens another menu
start:URLReads another start.json and opens its parameter
backGoes back one screen
home (or restart)Goes back to the start of the content
reloadReloads the current page
settingsOpens CF media Settings
info:text · success:textShows a quick notice
warn:text · error:textShows a warning or error notice
[action1|action2]Runs several actions in sequence

Examples

items
[
  { "title": "Trailer", "action": "video:http://{SERVER}/media/trailer.mp4" },
  { "title": "Live", "action": "video:http://{SERVER}/live/stream.m3u8" },
  { "title": "Radio", "image": "http://{SERVER}/img/radio.jpg", "action": "audio:http://{SERVER}/radio.mp3" },
  { "title": "Gallery", "action": "content:http://{SERVER}/cfmedia/gallery.json" },
  { "title": "Notice", "action": "[info:Loading the gallery|content:http://{SERVER}/cfmedia/gallery.json]" }
]
tips_and_updates
All variables ({SERVER}, {PREFIX}…) work inside actions.