Difference between revisions of "Background Plugin"
Jump to navigation
Jump to search
(Created page with "This is a special video plugin that plays a video in an endless loop. The plugin can be used with version '''0.1.74''' or higher. == Usage == The plugin must be loaded with a...") |
(→Code) |
||
Line 24: | Line 24: | ||
=== Code === | === Code === | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
− | {} | + | { |
+ | "headline": "Background Plugin Test", | ||
+ | "style": "overlay", | ||
+ | "transparent": 2, | ||
+ | "ready": { | ||
+ | "action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos1.mp4", | ||
+ | "data": { | ||
+ | "playerLabel": "Atmospheric Background 1", | ||
+ | "properties": { | ||
+ | "control:type": "extended", | ||
+ | "control:transparent": true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | "menu": [{ | ||
+ | "label": "Menu Item 1", | ||
+ | "data": { | ||
+ | "pages": [{ | ||
+ | "items": [{ | ||
+ | "layout": "0,0,12,6", | ||
+ | "text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 1}.", | ||
+ | "action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos1.mp4", | ||
+ | "playerLabel": "Atmospheric Background 1", | ||
+ | "properties": { | ||
+ | "control:type": "extended", | ||
+ | "control:transparent": true | ||
+ | } | ||
+ | }] | ||
+ | }] | ||
+ | } | ||
+ | }, { | ||
+ | "label": "Menu Item 2", | ||
+ | "data": { | ||
+ | "pages": [{ | ||
+ | "items": [{ | ||
+ | "layout": "0,0,12,6", | ||
+ | "text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 2}.", | ||
+ | "action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos2.mp4", | ||
+ | "playerLabel": "Atmospheric Background 2", | ||
+ | "properties": { | ||
+ | "control:type": "extended", | ||
+ | "control:transparent": true | ||
+ | } | ||
+ | }] | ||
+ | }] | ||
+ | } | ||
+ | }, { | ||
+ | "label": "Menu Item 3", | ||
+ | "data": { | ||
+ | "pages": [{ | ||
+ | "items": [{ | ||
+ | "layout": "0,0,12,6", | ||
+ | "text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 3}.", | ||
+ | "action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos3.mp4", | ||
+ | "playerLabel": "Atmospheric Background 3", | ||
+ | "properties": { | ||
+ | "control:type": "extended", | ||
+ | "control:transparent": false | ||
+ | } | ||
+ | }] | ||
+ | }] | ||
+ | } | ||
+ | }] | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 21:36, 11 November 2021
This is a special video plugin that plays a video in an endless loop. The plugin can be used with version 0.1.74 or higher.
Usage[edit]
The plugin must be loaded with a video URL. Please see following action syntax example.
If you would like to use the plugin as reference to implement your own plugin, please have a look at this implementation script: http://msx.benzac.de/plugins/js/background.js.
Syntax[edit]
Parameter | Type | Default Value | Mandatory | Description |
---|---|---|---|---|
url |
string |
null |
Yes |
The URL of the background video. It is recommended to encode the value to ensure that it is evaluated correctly (e.g. |
Example[edit]
Screenshot[edit]
Code[edit]
{
"headline": "Background Plugin Test",
"style": "overlay",
"transparent": 2,
"ready": {
"action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos1.mp4",
"data": {
"playerLabel": "Atmospheric Background 1",
"properties": {
"control:type": "extended",
"control:transparent": true
}
}
},
"menu": [{
"label": "Menu Item 1",
"data": {
"pages": [{
"items": [{
"layout": "0,0,12,6",
"text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 1}.",
"action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos1.mp4",
"playerLabel": "Atmospheric Background 1",
"properties": {
"control:type": "extended",
"control:transparent": true
}
}]
}]
}
}, {
"label": "Menu Item 2",
"data": {
"pages": [{
"items": [{
"layout": "0,0,12,6",
"text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 2}.",
"action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos2.mp4",
"playerLabel": "Atmospheric Background 2",
"properties": {
"control:type": "extended",
"control:transparent": true
}
}]
}]
}
}, {
"label": "Menu Item 3",
"data": {
"pages": [{
"items": [{
"layout": "0,0,12,6",
"text": "Press {txt:msx-white:OK} to switch to {txt:msx-white:Atmospheric Background 3}.",
"action": "video:auto:plugin:http://msx.benzac.de/plugins/background.html?url=http://msx.benzac.de/media/atmos3.mp4",
"playerLabel": "Atmospheric Background 3",
"properties": {
"control:type": "extended",
"control:transparent": false
}
}]
}]
}
}]
}
Demo[edit]
- Launch via App: https://msx.benzac.de/?start=content:https://msx.benzac.de/info/xp/data/plugin_test_6.json
- Launch via Demo Page: https://msx.benzac.de/info/?start=content:https://msx.benzac.de/info/xp/data/plugin_test_6.json