Difference between revisions of "Content Root Object"

From MSX - Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
     "restore": true,
 
     "restore": true,
 
     "important": false,   
 
     "important": false,   
     "wrap": false,   
+
     "wrap": false,
    "transparent": false,
 
 
     "compress": false,
 
     "compress": false,
 +
    "transparent": 0,
 
     "type": "pages",
 
     "type": "pages",
 
     "preload": "none",
 
     "preload": "none",
Line 72: Line 72:
 
'''Note: If the active content page has its own <code>wrap</code> property, this property is ignored.'''
 
'''Note: If the active content page has its own <code>wrap</code> property, this property is ignored.'''
 
|-
 
|-
| <code>transparent</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=120|'''0.1.120''' ||  
+
| <code>compress</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=123|'''0.1.123''' ||
 +
Indicates if the content is compressed by 25%. This property is part of the hidden features. For more information, please see [[Compress Property]].
 +
|-
 +
| <code>transparent</code> || <code>number</code> || <code>0</code> || No || data-sort-value=142|'''0.1.142''' ||  
 
Indicates if the content background is transparent. By default, the content background is set to a semi-transparent gray to darken the underlying video/image and make the content more visible. This property has no effect if the content is displayed in a panel.
 
Indicates if the content background is transparent. By default, the content background is set to a semi-transparent gray to darken the underlying video/image and make the content more visible. This property has no effect if the content is displayed in a panel.
  
'''Note: If the active content page has its own <code>transparent</code> property, this property is ignored.'''
+
* <code>0</code>: Never transparent.
|-
+
* <code>1</code>: Only transparent if no video or audio is active.
| <code>compress</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=123|'''0.1.123''' ||
+
* <code>2</code>: Only transparent if no video is active.
Indicates if the content is compressed by 25%. This property is part of the hidden features. For more information, please see [[Compress Property]].
+
* <code>3</code>: Only transparent if no audio is active.
 +
* <code>4</code>: Only transparent if video or audio is active.
 +
* <code>5</code>: Only transparent if video is active.
 +
* <code>6</code>: Only transparent if audio is active.
 +
* <code>7</code>: Always transparent.
 +
 
 +
'''Note: If the active content page has its own <code>transparent</code> property, this property is ignored. For backwards compatibility, it is also possible to set <code>true</code> for <code>1</code> and <code>false</code> for <code>0</code>. '''
 
|-
 
|-
 
| <code>type</code> || <code>string</code> || <code>"pages"</code> || No || data-sort-value=0|0.1.0 ||  
 
| <code>type</code> || <code>string</code> || <code>"pages"</code> || No || data-sort-value=0|0.1.0 ||  

Revision as of 12:16, 10 November 2021

{  
    "name": "Content Name",
    "version": "1.0.0", 
    "reference": "http://link.to.content",
    "flag": "content_flag",
    "reuse": true,
    "cache": true,    
    "restore": true,
    "important": false,  
    "wrap": false,
    "compress": false,
    "transparent": 0,
    "type": "pages",
    "preload": "none",
    "headline": "Content Headline", 
    "background": "http://link.to.image",
    "extension": "Content Extension",
    "dictionary": "http://link.to.dictionary",
    "template": null,
    "items": [],    
    "pages": [],
    "header": null,
    "footer": null,  
    "overlay": null,  
    "underlay": null,
    "action": null,
    "data": null,
    "options": null,
    "caption": "opt/menu"
}
Property syntax of content root object
Property Type Default Value Mandatory Since Version Description
name string null No 0.1.0

The name of the content. This property is only used if the content data is loaded at startup and can be used to set the content name. This value is displayed in the about panel of the Media Station X application.

version string null No 0.1.0

The version of the content. This property is only used if the content data is loaded at startup and can be used to add a content version. This value is displayed in the about panel of the Media Station X application.

reference string null No 0.1.134

The reference of the content data. This property is only used if the content data is loaded at startup and can be used to load the actual data (i.e. non-startup related data) from another location. This allows you to keep the start content data more dynamic (e.g. by reloading it on the fly).

Note: Please note that most properties (e.g. headline, items, pages, options, etc.) are ignored if this property is set, because the corresponding values are provided by the referenced data. Additionally, please note that it is also possible to indicate request actions instead of URLs (e.g. "request:interaction:{DATA_ID}@{URL}").

flag string null No 0.1.120

A custom content flag that can be evaluated by plugins and/or servers.

reuse boolean true No 0.1.0

Indicates if the content data can be reused. If this property is set to false, the content data is recreated each time it is displayed.

cache boolean true No 0.1.58

Indicates if the content data is being cached. This property can be used to disable the cache feature.

restore boolean true No 0.1.120

Indicates if the content data is restorable. If this property is set to false, the content data is not restored when the application returns from a link action. This property has no effect if the content is displayed in a panel.

Note: If the content is loaded via a menu and the menu data has set the restore property to false, this property is ignored.

important boolean false No 0.1.58

Indicates if the content data is important. This property can be used to enforce that the content headline is displayed.

Note: The content headline is not displayed if the content is loaded via a menu, because in that case the menu item label is used as headline.

wrap boolean false No 0.1.102

Indicates if the content data is wrapped. If this property is set to true, a corresponding menu can not be entered by using the navigation keys (i.e. left and right key). This property has no effect if the content is displayed in a panel or the content is not loaded via a menu.

Note: If the active content page has its own wrap property, this property is ignored.

compress boolean false No 0.1.123

Indicates if the content is compressed by 25%. This property is part of the hidden features. For more information, please see Compress Property.

transparent number 0 No 0.1.142

Indicates if the content background is transparent. By default, the content background is set to a semi-transparent gray to darken the underlying video/image and make the content more visible. This property has no effect if the content is displayed in a panel.

  • 0: Never transparent.
  • 1: Only transparent if no video or audio is active.
  • 2: Only transparent if no video is active.
  • 3: Only transparent if no audio is active.
  • 4: Only transparent if video or audio is active.
  • 5: Only transparent if video is active.
  • 6: Only transparent if audio is active.
  • 7: Always transparent.

Note: If the active content page has its own transparent property, this property is ignored. For backwards compatibility, it is also possible to set true for 1 and false for 0.

type string "pages" No 0.1.0

The type of the content items.

  • "pages": The content items are displayed as pages in horizontal direction.
  • "list": The content items are displayed as list in vertical direction.

Note: If the "list" type is used, content pages are stacked (i.e. vertical gaps between content pages are removed). This property has no effect if the content is displayed in a panel, because panels always use the "list" type.

preload string "none" No 0.1.92

The preload mode of the content pages (available for type "pages" and "list"). This property can be used to preload the next and/or previous visible page (e.g. to preload images, to pre-perform live updates, etc.). By default, this feature is disabled.

Note: Please use this feature wisely, because preloading pages can decrease the performance.

  • "none": Preload no pages.
  • "next": Preload the next visible page.
  • "prev": Preload the previous visible page.
  • "full": Preload the next and previous visible page.
headline string null No 0.1.0

The headline of the content.

Note: This property has no effect if the content is loaded via a menu, because in that case the menu item label is used as headline. Since version 0.1.58, you can set the property important to true to enforce that this property is used.

This property supports Inline Expressions.

background string null No 0.1.0

The background image that is used if no other background is set at lower levels. If the content data is loaded at startup, this background image is used as default.

extension string null No 0.1.82

The extension of the content screen. This property can be used to display a small label in the upper right corner of the content screen (e.g. to show the logged in user, the current date/time, etc.). This property supports Inline Expressions and Live Inline Expressions.

dictionary string null No 0.1.120

A URL to a dictionary file. This property is only used if the content data is loaded at startup and can be used to setup a dictionary. A dictionary can be used to translate the application user interface. For more information, please see Dictionary Structure.

template object null Only for templated items 0.1.0

The template object to automatically create and position content items. Please see Content Item Object for the data structure. This property is mandatory if the content items should be automatically created and positioned.

Note: Templated content items have all the same size and can be used to quickly create lists without having to deal with grid positions. To use this property, the items property must also be set, otherwise this property is ignored.

items array null Only for templated items 0.1.0

An array of content items. Please see Content Item Object for the data structure. This property is mandatory if the content items should be automatically created and positioned.

Note: Templated content items only have to specify the relevant properties. The other properties are copied from the template object. To use this property, the template property must also be set, otherwise this property is ignored.

pages array null Only for non-templated items 0.1.0

An array of content pages. Please see Content Page Object for the data structure. This property is mandatory if the content items should be manually created and positioned.

Note: This property is ignored if a template and items property is set.

header object null No 0.1.53

An individual header page for templated content items. Please see Content Page Object for the data structure.

Note: To use this property, the template and items property must also be set, otherwise this property is ignored.

footer object null No 0.1.53

An individual footer page for templated content items. Please see Content Page Object for the data structure.

Note: To use this property, the template and items property must also be set, otherwise this property is ignored.

overlay object null No 0.1.110

An independent overlay page that is displayed over each content page. Please see Content Page Object for the data structure.

Note: For the overlay page, only items of type "space" are allowed. It is possible to hide the overlay page if the active content page has set the important property to true.

underlay object null No 0.1.112

An independent underlay page that is displayed under each content page. Please see Content Page Object for the data structure.

Note: For the underlay page, only items of type "space" are allowed. It is possible to hide the underlay page if the active content page has set the important property to true.

action string null No 0.1.0

The start action that is executed if the content data is loaded at startup. This property is part of the hidden features. For more information, please see Start Action.

data object null No 0.1.0

The additional data of the start action that is used if the action is executed. This property is part of the hidden features. For more information, please see Start Action.

options object null No 0.1.120

A special page object that is displayed in a panel if a content item is selected and the menu button is pressed. The availability of options for the current selected item is indicated in the lower right corner of the content screen. This property is ignored if the content is displayed in a panel. Please see Content Page Object for the data structure.

Since version 0.1.130, you can also set a Content Root Object as options.

Note: If the active content page or the selected content item has its own options property, this property is ignored.

caption string "opt/menu" No 0.1.130

This property is only used if the content data is set as options property and can be used to set a custom options caption (indicated in the lower right corner of the content screen). This property supports Inline Expressions.

Related Hidden Features[edit]

See also[edit]