Attached Data Examples

From MSX - Wiki
Revision as of 11:50, 14 January 2021 by Benzac (talk | contribs)
Jump to navigation Jump to search

These are examples of the attached data that is sent/committed to the server/plugin for specific execute/commit actions. They are only valid for version 0.1.125+. Please ensure that you are using the correct version, because the syntax in previous versions can be different. For more information about the execute/commit actions, please see Internal Actions.

Note: Please note that no action-related data property is used for all examples. Therefore, the sent/committed data property is always null.

Examples of attached data
Action Example Data Example

execute:{URL}
player:commit
interaction:commit

{
    "data": null
}

execute:code:{URL}
player:commit:code
interaction:commit:code

{
    "code": "1234",
    "data": null
}

execute:video:{URL}
player:commit:video
interaction:commit:video

{
    "video": {
        "info": {
            "id": null,
            "index": 0,
            "number": 1,
            "count": 3,
            "listIndex": 0,
            "listSize": 3,
            "type": "video",
            "url": "http://msx.benzac.de/media/video1.mp4",
            "label": "Video 1",
            "background": null,
            "customLabel": null,
            "customBackground": null,
            "properties": null
        },
        "data": {
            "state": 2,
            "position": 4,
            "duration": 118,
            "speed": 1,
            "ended": false
        },
        "resume": {
            "key": null,
            "count": 10,
            "resuming": false,
            "position": null,
            "progress": -1
        },
        "volume": {
            "type": "player",
            "level": 100,
            "muted": false
        },
        "scene": "foreground"
    },
    "data": null
}