Difference between revisions of "Actions"

From MSX - Wiki
Jump to navigation Jump to search
(Created page with "All actions are indicated as strings and are used by content items to perform specific tasks (e.g. play a video, start a slideshow, etc.). Some actions use additional data, pr...")
 
Line 1: Line 1:
 
All actions are indicated as strings and are used by content items to perform specific tasks (e.g. play a video, start a slideshow, etc.). Some actions use additional data, provided by the corresponding content item.
 
All actions are indicated as strings and are used by content items to perform specific tasks (e.g. play a video, start a slideshow, etc.). Some actions use additional data, provided by the corresponding content item.
  
 +
== Base Actions ==
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
Line 9: Line 10:
 
| data-sort-value=0|0.1.0  
 
| data-sort-value=0|0.1.0  
 
|| Plays a video. The <code>{URL}</code> part must be replaced with the video URL.
 
|| Plays a video. The <code>{URL}</code> part must be replaced with the video URL.
 
+
|-
 +
| <code>audio:{URL}</code>
 +
|| <code>audio:http://msx.benzac.de/media/audio1.mp3</code>
 +
| data-sort-value=0|0.1.0
 +
|| Plays an audio file. The <code>{URL}</code> part must be replaced with the audio URL. This action works in the same way as <code>video:{URL}</code>, except that the video screen is not displayed. Instead, the background screen is displayed. If the corresponding content item provides a <code>background</code> property, it is used, otherwise the next available <code>background</code> property (at higher level) is used.
 +
|-
 +
| <code>image:{URL}</code>
 +
|| <code>image:http://msx.benzac.de/img/bg1.jpg</code>
 +
| data-sort-value=0|0.1.0
 +
|| Shows an image. The <code>{URL}</code> part must be replaced with the image URL.
 +
|-
 +
| <code>image:context</code>
 +
|| <code>image:context</code>
 +
| data-sort-value=0|0.1.0
 +
|| Shows an image by using the current context. The image URL must be provided as <code>image</code> property by the corresponding content item.
 +
|-
 +
| <code>link:{URL}</code>
 +
|| <code>link:http://msx.benzac.de/info/</code>
 +
| data-sort-value=0|0.1.0
 +
|| Opens a link. The <code>{URL}</code> part must be replaced with the link URL.
 +
|-
 +
| <code>link:window:{URL}</code>
 +
|| <code>link:window:http://msx.benzac.de/info/</code>
 +
| data-sort-value=0|0.1.0
 +
|| Opens a link in a separate window or in an external browser. The {URL} part must be replaced with the link URL.
 +
|-
 +
| <code>playlist:{URL}</code>
 +
|| <code>playlist:http://msx.benzac.de/info/data/guide/videos.json</code>
 +
| data-sort-value=0|0.1.0
 +
|| Loads a playlist without a corresponding content page. The <code>{URL}</code> part must be replaced with the playlist URL. The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see [[Content Root Object]] for more information.
 
|}
 
|}

Revision as of 14:05, 12 January 2021

All actions are indicated as strings and are used by content items to perform specific tasks (e.g. play a video, start a slideshow, etc.). Some actions use additional data, provided by the corresponding content item.

Base Actions[edit]

Syntax Example Since Version Description
video:{URL} video:http://msx.benzac.de/media/video1.mp4 0.1.0 Plays a video. The {URL} part must be replaced with the video URL.
audio:{URL} audio:http://msx.benzac.de/media/audio1.mp3 0.1.0 Plays an audio file. The {URL} part must be replaced with the audio URL. This action works in the same way as video:{URL}, except that the video screen is not displayed. Instead, the background screen is displayed. If the corresponding content item provides a background property, it is used, otherwise the next available background property (at higher level) is used.
image:{URL} image:http://msx.benzac.de/img/bg1.jpg 0.1.0 Shows an image. The {URL} part must be replaced with the image URL.
image:context image:context 0.1.0 Shows an image by using the current context. The image URL must be provided as image property by the corresponding content item.
link:{URL} link:http://msx.benzac.de/info/ 0.1.0 Opens a link. The {URL} part must be replaced with the link URL.
link:window:{URL} link:window:http://msx.benzac.de/info/ 0.1.0 Opens a link in a separate window or in an external browser. The {URL} part must be replaced with the link URL.
playlist:{URL} playlist:http://msx.benzac.de/info/data/guide/videos.json 0.1.0 Loads a playlist without a corresponding content page. The {URL} part must be replaced with the playlist URL. The data structure is the same like the Templated Items from the Content API. Please see Content Root Object for more information.