Difference between revisions of "Attached Data Examples"

From MSX - Wiki
Jump to navigation Jump to search
Line 177: Line 177:
 
                 "contentIndex": -1,
 
                 "contentIndex": -1,
 
                 "contentSize": -1,
 
                 "contentSize": -1,
                 "sceneVisible": true,
+
                 "contentVisible": true,
                 "sceneActive": true,
+
                 "panelId": null,
 +
                "panelFlag": null,
 +
                "panelFocus": null,
 +
                "panelIndex": -1,
 +
                "panelSize": -1,
 +
                "panelVisible": false,
 
                 "videoVisible": false,
 
                 "videoVisible": false,
 
                 "videoActive": false,
 
                 "videoActive": false,
                 "slideshowActive": false,
+
                 "slideshowVisible": false,
                 "overlayActive": false
+
                 "volumeVisible": false,
 +
                "logVisible": false
 
             },
 
             },
 
             "interaction": "http://gd.msx.benzac.de/interaction"             
 
             "interaction": "http://gd.msx.benzac.de/interaction"             

Revision as of 09:14, 15 April 2021

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.134+. 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
}

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

{
    "slider": {
        "state": 3,
        "id": null,
        "index": 0,
        "number": 1,
        "count": 4,
        "listIndex": 0,
        "listSize": 4,
        "url": "http://msx.benzac.de/img/bg1.jpg",
        "label": "Image 1",
        "color": null,
        "filler": null,
        "properties": null
    },
    "data": null
}

execute:info:extended:{URL}
player:commit:info:extended
interaction:commit:info:extended

{
    "info": {
        "host": "local",
        "secure": false,
        "client": null,
        "platform": "android",
        "player": "html5/plugin",
        "userAgent": "Mozilla/5.0 ...",
        "application": {
            "name": "Media Station X",
            "version": "0.1.107",
            "suffix": null,
            "settings": {
                "validateLinks": 1,
                "randomPlayback": 0,
                "slideshowInterval": 10000,
                "hoverEffect": 1,
                "menuButton": {
                    "action": -1,
                    "keyCode": -1
                }
            }
        },
        "framework": {
            "name": "TVX Framework",
            "version": "0.1.14",
            "suffix": null,
            "settings": {
                "animate": 2,
                "transform": 1,
                "input": 3,
                "remote": 1,
                "layout": "1",
                "scale": "auto",
                "zoom": null,
                "center": 1,
                "background": 1,
                "leave": 0,
                "exit": 1,
                "back": 1,
                "volume": 1,
                "busy": 1,
                "speed": 3,
                "playback": 1,
                "fullscreen": 1,
                "suspend": 2
            }
        },
        "content": {
            "name": "Google Drive MSX",
            "version": "1.0.14",
            "flag": null,
            "server": "gd.msx.benzac.de",
            "secure": false,
            "parameter": "menu:request:interaction:init@http://gd.msx.benzac.de/interaction",
            "state": {
                "start": true,
                "restored": false,                
                "menuId": null,
                "menuFlag": null,
                "menuFocus": "index:0",
                "menuIndex": 0,
                "menuSize": 3,
                "contentId": null,
                "contentFlag": null,
                "contentFocus": null,
                "contentIndex": -1,
                "contentSize": -1,
                "contentVisible": true,
                "panelId": null,
                "panelFlag": null,
                "panelFocus": null,
                "panelIndex": -1,
                "panelSize": -1,
                "panelVisible": false,
                "videoVisible": false,
                "videoActive": false,
                "slideshowVisible": false,
                "volumeVisible": false,
                "logVisible": false
            },
            "interaction": "http://gd.msx.benzac.de/interaction"            
        },
        "dictionary": {
            "url": "http://msx.benzac.de/dic/en.json",
            "name": "English",
            "version": "1.0.0",
            "size": 277
        },
        "screen": {
            "width": 1280,
            "height": 720,
            "factor": 1,
            "zoomFactor": 1
        },
        "time": {
            "timestamp": 1580465719024,
            "now": 1580465718178,
            "zone": 3600000,
            "offset": 0,
            "zoneOffset": 0
        },
        "urlParams": {},
        "system": {
            "name": "Device - Android 8.0.0",
            "ipAddress": "192.168.0.10",
            "manufacturer": null,
            "deviceId": "0000000000000000"
        }
    },
    "data": null
}

player:commit:message:test
interaction:commit:message:test

{
    "message": "test",
    "data": null
}

player:commit:string:transform:test
interaction:commit:string:transform:test

{
    "string": "pzr.",
    "data": null
}

player:commit:string:normalize:pzr.
interaction:commit:string:normalize:pzr.

{
    "string": "test",
    "data": null
}

player:commit:response:http://msx.benzac.de/services/echo.php
interaction:commit:response:http://msx.benzac.de/services/echo.php

{
    "response": {
        "action": "info:Hello, I am a simple echo service."
    },
    "error": null,
    "data": null
}

player:commit:dictionary
interaction:commit:dictionary

{
    "dictionary": {
        "name": "English",
        "version": "1.0.0",
        "size": 277,
        "properties": {
            "format:date": "mm/dd/yy",
            "format:day": "D mm/dd",
            "format:full_day": "DD, MM d, yyyy",
            "format:long_date": "MM d, yyyy",
            "format:long_day": "D mm/dd/yyyy",
            "format:long_time": "h:mm:ss/ampm",
            "format:separator": ", ",
            "format:time": "h:mm/ampm",
            [...]
        }
    },
    "data": null
}

notification:test

{
    "notification": "test",
    "data": null
}