Difference between revisions of "Actions"
Line 40: | Line 40: | ||
| data-sort-value=0|0.1.0 | | 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. | || 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. | + | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see '''[[Content Root Object]]''' for more information. |
|- | |- | ||
| <code>playlist:data</code> | | <code>playlist:data</code> | ||
Line 46: | Line 46: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Starts a playlist without a corresponding content page. The playlist data must be provided as <code>data</code> property by the corresponding content item. | || Starts a playlist without a corresponding content page. The playlist data must be provided as <code>data</code> property by the corresponding content item. | ||
− | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see [[Content Root Object]] for more information. | + | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see '''[[Content Root Object]]''' for more information. |
|- | |- | ||
| <code>slideshow:{URL}</code> | | <code>slideshow:{URL}</code> | ||
Line 52: | Line 52: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Loads a slideshow without a corresponding content page. The <code>{URL}</code> part must be replaced with the slideshow URL. | || Loads a slideshow without a corresponding content page. The <code>{URL}</code> part must be replaced with the slideshow URL. | ||
− | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see [[Content Root Object]] for more information. | + | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see '''[[Content Root Object]]''' for more information. |
|- | |- | ||
| <code>slideshow:data</code> | | <code>slideshow:data</code> | ||
Line 58: | Line 58: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Starts a slideshow without a corresponding content page. The playlist data must be provided as <code>data</code> property by the corresponding content item. | || Starts a slideshow without a corresponding content page. The playlist data must be provided as <code>data</code> property by the corresponding content item. | ||
− | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see [[Content Root Object]] for more information. | + | The data structure is the same like the '''Templated Items''' from the '''Content API'''. Please see '''[[Content Root Object]]''' for more information. |
|- | |- | ||
| <code>menu:{URL}</code> | | <code>menu:{URL}</code> | ||
Line 64: | Line 64: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Loads a menu. The <code>{URL}</code> part must be replaced with the menu URL. | || Loads a menu. The <code>{URL}</code> part must be replaced with the menu URL. | ||
− | Please see [[Menu Root Object]] for the data structure. | + | Please see '''[[Menu Root Object]]''' for the data structure. |
|- | |- | ||
| <code>menu:data</code> | | <code>menu:data</code> | ||
Line 70: | Line 70: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows a menu. The menu data must be provided as <code>data</code> property by the corresponding content item. | || Shows a menu. The menu data must be provided as <code>data</code> property by the corresponding content item. | ||
− | Please see [[Menu Root Object]] for the data structure. | + | Please see '''[[Menu Root Object]]''' for the data structure. |
|- | |- | ||
| <code>content:{URL}</code> | | <code>content:{URL}</code> | ||
Line 76: | Line 76: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Loads a content page. The <code>{URL}</code> part must be replaced with the content URL. | || Loads a content page. The <code>{URL}</code> part must be replaced with the content URL. | ||
− | Please see [[Content Root Object]] for the data structure. | + | Please see '''[[Content Root Object]]''' for the data structure. |
|- | |- | ||
| <code>content:data</code> | | <code>content:data</code> | ||
Line 82: | Line 82: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows a content page. The content data must be provided as <code>data</code> property by the corresponding content item. | || Shows a content page. The content data must be provided as <code>data</code> property by the corresponding content item. | ||
− | Please see [[Content Root Object]] for the data structure. | + | Please see '''[[Content Root Object]]''' for the data structure. |
|- | |- | ||
| <code>panel:{URL}</code> | | <code>panel:{URL}</code> | ||
Line 88: | Line 88: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Loads a content page in a panel. The <code>{URL}</code> part must be replaced with the content URL. | || Loads a content page in a panel. The <code>{URL}</code> part must be replaced with the content URL. | ||
− | Please see [[Content Root Object]] for the data structure. | + | Please see '''[[Content Root Object]]''' for the data structure. |
|- | |- | ||
| <code>panel:data</code> | | <code>panel:data</code> | ||
Line 94: | Line 94: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows a content page in a panel. The content data must be provided as <code>data</code> property by the corresponding content item. | || Shows a content page in a panel. The content data must be provided as <code>data</code> property by the corresponding content item. | ||
− | Please see [[Content Root Object]] for the data structure. | + | Please see '''[[Content Root Object]]''' for the data structure. |
|- | |- | ||
| <code>success:{TEXT}</code> | | <code>success:{TEXT}</code> | ||
Line 100: | Line 100: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows a success message. The <code>{TEXT}</code> part must be replaced with any text. | || Shows a success message. The <code>{TEXT}</code> part must be replaced with any text. | ||
− | The text supports inline expressions. Please see [[Inline Expressions]] for more information. | + | The text supports inline expressions. Please see '''[[Inline Expressions]]''' for more information. |
|- | |- | ||
| <code>info:{TEXT}</code> | | <code>info:{TEXT}</code> | ||
Line 106: | Line 106: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows an info message. The <code>{TEXT}</code> part must be replaced with any text. | || Shows an info message. The <code>{TEXT}</code> part must be replaced with any text. | ||
− | The text supports inline expressions. Please see [[Inline Expressions]] for more information. | + | The text supports inline expressions. Please see '''[[Inline Expressions]]''' for more information. |
|- | |- | ||
| <code>warn:{TEXT}</code> | | <code>warn:{TEXT}</code> | ||
Line 112: | Line 112: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows a warning message. The <code>{TEXT}</code> part must be replaced with any text. | || Shows a warning message. The <code>{TEXT}</code> part must be replaced with any text. | ||
− | The text supports inline expressions. Please see [[Inline Expressions]] for more information. | + | The text supports inline expressions. Please see '''[[Inline Expressions]]''' for more information. |
|- | |- | ||
| <code>error:{TEXT}</code> | | <code>error:{TEXT}</code> | ||
Line 118: | Line 118: | ||
| data-sort-value=0|0.1.0 | | data-sort-value=0|0.1.0 | ||
|| Shows an error message. The <code>{TEXT}</code> part must be replaced with any text. | || Shows an error message. The <code>{TEXT}</code> part must be replaced with any text. | ||
− | The text supports inline expressions. Please see [[Inline Expressions]] for more information. | + | The text supports inline expressions. Please see '''[[Inline Expressions]]''' for more information. |
|- | |- | ||
| <code>focus:{ID}</code> | | <code>focus:{ID}</code> | ||
Line 134: | Line 134: | ||
| data-sort-value=30|'''0.1.30''' | | data-sort-value=30|'''0.1.30''' | ||
|| Sets up a new start parameter. The start parameter data must be provided as data property by the corresponding content item. | || Sets up a new start parameter. The start parameter data must be provided as data property by the corresponding content item. | ||
− | Please see [[Start Object]] for the data structure. | + | Please see '''[[Start Object]]''' for the data structure. |
|- | |- | ||
| <code>video:plugin:{URL}</code> | | <code>video:plugin:{URL}</code> | ||
Line 140: | Line 140: | ||
| data-sort-value=40|'''0.1.40''' | | data-sort-value=40|'''0.1.40''' | ||
|| Plays a plugin video. The <code>{URL}</code> part must be replaced with the plugin URL. | || Plays a plugin video. The <code>{URL}</code> part must be replaced with the plugin URL. | ||
− | Please see the [[YouTube, Vimeo & Co.]] for plugin examples. | + | Please see the '''[[YouTube, Vimeo & Co.]]''' for plugin examples. |
|- | |- | ||
| <code>audio:plugin:{URL}</code> | | <code>audio:plugin:{URL}</code> | ||
Line 146: | Line 146: | ||
| data-sort-value=40|'''0.1.40''' | | data-sort-value=40|'''0.1.40''' | ||
|| Plays a plugin audio file. The <code>{URL}</code> part must be replaced with the plugin URL. This action works in the same way as <code>video:plugin:{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. | || Plays a plugin audio file. The <code>{URL}</code> part must be replaced with the plugin URL. This action works in the same way as <code>video:plugin:{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. | ||
− | Please see the [[YouTube, Vimeo & Co.]] for plugin examples. | + | Please see the '''[[YouTube, Vimeo & Co.]]''' for plugin examples. |
|} | |} | ||
Line 187: | Line 187: | ||
'''Note: If you return actions like <code>video:{URL}</code> or <code>audio:{URL}</code>, the corresponding content item properties (i.e. <code>playerLabel</code>, <code>background</code>, and <code>properties</code>) must be indicated in the action-related <code>data</code> property (i.e. <code>response.data.data</code> property) in order to be used.''' | '''Note: If you return actions like <code>video:{URL}</code> or <code>audio:{URL}</code>, the corresponding content item properties (i.e. <code>playerLabel</code>, <code>background</code>, and <code>properties</code>) must be indicated in the action-related <code>data</code> property (i.e. <code>response.data.data</code> property) in order to be used.''' | ||
− | Please see [[Responses]] for more information. | + | Please see '''[[Responses]]''' for more information. |
|} | |} | ||
Revision as of 15:08, 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. |
playlist:data
|
playlist:data
|
0.1.0 | Starts a playlist without a corresponding content page. The playlist data must be provided as data property by the corresponding content item.
The data structure is the same like the Templated Items from the Content API. Please see Content Root Object for more information. |
slideshow:{URL}
|
slideshow:http://msx.benzac.de/info/data/guide/images.json
|
0.1.0 | Loads a slideshow without a corresponding content page. The {URL} part must be replaced with the slideshow URL.
The data structure is the same like the Templated Items from the Content API. Please see Content Root Object for more information. |
slideshow:data
|
slideshow:data
|
0.1.0 | Starts a slideshow without a corresponding content page. The playlist data must be provided as data property by the corresponding content item.
The data structure is the same like the Templated Items from the Content API. Please see Content Root Object for more information. |
menu:{URL}
|
menu:http://msx.benzac.de/info/data/guide/actions.json
|
0.1.0 | Loads a menu. The {URL} part must be replaced with the menu URL.
Please see Menu Root Object for the data structure. |
menu:data
|
menu:data
|
0.1.0 | Shows a menu. The menu data must be provided as data property by the corresponding content item.
Please see Menu Root Object for the data structure. |
content:{URL}
|
content:http://msx.benzac.de/info/data/guide/videos.json
|
0.1.0 | Loads a content page. The {URL} part must be replaced with the content URL.
Please see Content Root Object for the data structure. |
content:data
|
content:data
|
0.1.0 | Shows a content page. The content data must be provided as data property by the corresponding content item.
Please see Content Root Object for the data structure. |
panel:{URL}
|
panel:http://msx.benzac.de/info/data/guide/panel.json
|
0.1.0 | Loads a content page in a panel. The {URL} part must be replaced with the content URL.
Please see Content Root Object for the data structure. |
panel:data
|
panel:data
|
0.1.0 | Shows a content page in a panel. The content data must be provided as data property by the corresponding content item.
Please see Content Root Object for the data structure. |
success:{TEXT}
|
success:This is a success message.
|
0.1.0 | Shows a success message. The {TEXT} part must be replaced with any text.
The text supports inline expressions. Please see Inline Expressions for more information. |
info:{TEXT}
|
info:This is an info message.
|
0.1.0 | Shows an info message. The {TEXT} part must be replaced with any text.
The text supports inline expressions. Please see Inline Expressions for more information. |
warn:{TEXT}
|
warn:This is a warning message.
|
0.1.0 | Shows a warning message. The {TEXT} part must be replaced with any text.
The text supports inline expressions. Please see Inline Expressions for more information. |
error:{TEXT}
|
error:This is an error message.
|
0.1.0 | Shows an error message. The {TEXT} part must be replaced with any text.
The text supports inline expressions. Please see Inline Expressions for more information. |
focus:{ID}
|
focus:content_item_id
|
0.1.0 | Sets the focus to a specific item in the current context. The {ID} part must be replaced with an item ID (e.g. the content item ID).
|
focus:index:{INDEX}
|
focus:index:0
|
0.1.0 | Sets the focus to a specific item in the current context. The {INDEX} part must be replaced with an item index (e.g. index 0 will set the focus to the first item).
|
start
|
start
|
0.1.30 | Sets up a new start parameter. The start parameter data must be provided as data property by the corresponding content item.
Please see Start Object for the data structure. |
video:plugin:{URL}
|
video:plugin:http://msx.benzac.de/plugins/template.html
|
0.1.40 | Plays a plugin video. The {URL} part must be replaced with the plugin URL.
Please see the YouTube, Vimeo & Co. for plugin examples. |
audio:plugin:{URL}
|
audio:plugin:http://msx.benzac.de/plugins/template.html
|
0.1.40 | Plays a plugin audio file. The {URL} part must be replaced with the plugin URL. This action works in the same way as video:plugin:{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.
Please see the YouTube, Vimeo & Co. for plugin examples. |
HbbTV Actions[edit]
If you use the HbbTV version of Media Station X, you have additional actions available.
Syntax | Example | Since Version | Description |
---|---|---|---|
video:broadcast:current
|
video:broadcast:current
|
0.1.30 | Plays the current broadcast channel. |
system:hbbtv:launch:{URL}
|
system:hbbtv:launch:http://msx.benzac.de/hbbtv.html
|
0.1.30 | Launches a new HbbTV application. The {URL} part must be replaced with an HTML page or an XML AIT URL.
|
For more information about the HbbTV specification, please visit https://www.hbbtv.org.
Server Actions[edit]
It is possible to execute actions on server side. For this feature, you need programming skills, because you need to implement a service for your server. Server actions allow you to provide logins, member areas, parental controls, search queries, and more. All server actions are sent as HTTP POST requests. Parallel server actions are not allowed (only one server action can be running on application side).
Note: The Content-Type
header for all HTTP POST requests is set to application/x-www-form-urlencoded
(instead of application/json
) to ensure CORS support for simple services (by avoiding CORS preflight requests). Please ignore the Content-Type
header on your server and handle all incoming data from the Media Station X application as JSON objects. Since version 0.1.90, you can set an accurate:
prefix before {URL}
to use the accurate headers (e.g. execute:accurate:{URL}
, execute:code:accurate:{URL}
, execute:user:accurate:{URL}
, etc.).
Syntax | Example | Since Version | Description |
---|---|---|---|
execute:{URL}
|
execute:http://msx.benzac.de/services/echo.php
|
0.1.30 | Executes an action on server side and returns an action to be executed (e.g. to show a success/error message). The {URL} part must be replaced with your service URL. If the corresponding content item provides a data property, it is submitted as data property to your service.
The returned action must be indicated as Note: If you return actions like Please see Responses for more information. |
Extended Actions[edit]
These actions are useful when working with server actions (e.g. to perform a reload after login or to update content parts after successfully executing an action).
Syntax | Example | Since Version | Description |
---|