Difference between revisions of "Live Object"
Jump to navigation
Jump to search
(Created page with "The live object can be used to periodically update content items (e.g. with live data, playback progress, etc.). It can have following states. * "init": The initial state. Po...") |
|||
Line 1: | Line 1: | ||
The live object can be used to periodically update content items (e.g. with live data, playback progress, etc.). It can have following states. | The live object can be used to periodically update content items (e.g. with live data, playback progress, etc.). It can have following states. | ||
− | * "init": The initial state. Possible next states: "coming", "running", or "over". | + | * <code>"init"</code>: The initial state. Possible next states: <code>"coming"</code>, <code>"running"</code>, or <code>"over"</code>. |
− | * "coming": The object is not live yet or it was live before and can become live again. Possible next states: "running" or "over". | + | * <code>"coming"</code>: The object is not live yet or it was live before and can become live again. Possible next states: <code>"running"</code> or <code>"over"</code>. |
− | * "running": The object is live. Possible next states: "coming" or "over". | + | * <code>"running"</code>: The object is live. Possible next states: <code>"coming"</code> or <code>"over"</code>. |
− | * "over": The object is not live anymore. Possible next states: "coming" or "running". | + | * <code>"over"</code>: The object is not live anymore. Possible next states: <code>"coming"</code> or <code>"running"</code>. |
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 48: | Line 48: | ||
The type of the live object. If this property is not set, the current live object is removed. | The type of the live object. If this property is not set, the current live object is removed. | ||
− | * <code>"schedule"</code>: The object is live for a specific schedule time, indicated by a start and end timestamp (i.e. the <code>from</code> and <code>to</code> properties). Possible states: "init", "coming", "running", and "over". | + | * <code>"schedule"</code>: The object is live for a specific schedule time, indicated by a start and end timestamp (i.e. the <code>from</code> and <code>to</code> properties). Possible states: <code>"init"</code>, <code>"coming"</code>, <code>"running"</code>, and <code>"over"</code>. |
− | * <code>"lifetime"</code>: The object is live for a specific lifetime (starting from the creation timestamp), indicated by a duration and delay (i.e. the <code>duration</code> and <code>delay</code> properties). Possible states: "init", "coming", "running", and "over". | + | * <code>"lifetime"</code>: The object is live for a specific lifetime (starting from the creation timestamp), indicated by a duration and delay (i.e. the <code>duration</code> and <code>delay</code> properties). Possible states: <code>"init"</code>, <code>"coming"</code>, <code>"running"</code>, and <code>"over"</code>. |
− | * <code>"airtime"</code>: The object is live for a specific airtime (running for the visible time), indicated by a duration (i.e. the <code>duration</code> property). Possible states: "init", "running", and "over". | + | * <code>"airtime"</code>: The object is live for a specific airtime (running for the visible time), indicated by a duration (i.e. the <code>duration</code> property). Possible states: <code>"init"</code>, <code>"running"</code>, and <code>"over"</code>. |
− | * <code>"playback"</code>: The object is live if the corresponding content item is currently being played. Possible states: "init", "running", and "over". This type can only be used if the corresponding content action is <code>video:{URL}</code> or <code>audio:{URL}</code>. Please note that the corresponding content action URL is compared with the current player URL to check the live state. | + | * <code>"playback"</code>: The object is live if the corresponding content item is currently being played. Possible states: <code>"init"</code>, <code>"running"</code>, and <code>"over"</code>. This type can only be used if the corresponding content action is <code>video:{URL}</code> or <code>audio:{URL}</code>. Please note that the corresponding content action URL is compared with the current player URL to check the live state. |
− | * <code>"setup"</code>: The object is never live and has only the state "init", but the live action (i.e. the <code>action</code> property) is executed if the corresponding content item becomes visible. | + | * <code>"setup"</code>: The object is never live and has only the state <code>"init"</code>, but the live action (i.e. the <code>action</code> property) is executed if the corresponding content item becomes visible. |
'''Note: The live object is only evaluated if the corresponding content item is visible. If the corresponding content item is visible, the live object is evaluated every second, regardless of the current state. Since version 0.1.74, live objects of type <code>"playback"</code> can also have the state "coming" if the corresponding content item contains the extension property <code>resume:key</code>. Please also note that live objects are evaluated on an overlay/underlay page, even if the overlay/underlay page is hidden.''' | '''Note: The live object is only evaluated if the corresponding content item is visible. If the corresponding content item is visible, the live object is evaluated every second, regardless of the current state. Since version 0.1.74, live objects of type <code>"playback"</code> can also have the state "coming" if the corresponding content item contains the extension property <code>resume:key</code>. Please also note that live objects are evaluated on an overlay/underlay page, even if the overlay/underlay page is hidden.''' |
Revision as of 12:37, 14 January 2021
The live object can be used to periodically update content items (e.g. with live data, playback progress, etc.). It can have following states.
"init"
: The initial state. Possible next states:"coming"
,"running"
, or"over"
."coming"
: The object is not live yet or it was live before and can become live again. Possible next states:"running"
or"over"
."running"
: The object is live. Possible next states:"coming"
or"over"
."over"
: The object is not live anymore. Possible next states:"coming"
or"running"
.
{
"type": "schedule",
"from": 0,
"to": 0,
"duration": 0,
"delay": 0,
"coming": null,
"running": null,
"over": null,
"execute": null,
"color": "msx-glass",
"title": "Item Title",
"titleHeader": "Item Title Header",
"titleFooter": "Item Title Footer",
"label": "Item Label",
"icon": "blank",
"headline": "Item Headline",
"text": "Item Text",
"tag": "Item Tag",
"tagColor": "msx-red",
"badge": "Item Badge",
"badgeColor": "msx-green",
"progress": -1,
"progressColor": "msx-yellow",
"wrapperColor": "msx-blue",
"image": "http://link.to.image",
"extensionIcon": "blank",
"extensionLabel": "Item Extension Label",
"action": null,
"data": null
}
Property | Type | Default Value | Mandatory | Since Version | Description |
---|---|---|---|---|---|
type |
string |
null |
No | 0.1.70 |
The type of the live object. If this property is not set, the current live object is removed.
Note: The live object is only evaluated if the corresponding content item is visible. If the corresponding content item is visible, the live object is evaluated every second, regardless of the current state. Since version 0.1.74, live objects of type |