hyperion.ng/libsrc/api/JSONRPC_schema/schema-image.json
brindosch 09ee8f26ee
Feat: Add image sender to webui + Browser screen capture (#611)
* Feat: Add image sender to webui

This PR adds a new image sending feature to the webui and extends the api accordingly. In javascript the processing of images is horrible slow (without WASM), so the solution is at the API side with out-of-the-box power of Qt.

- The image cmd accepts now a raw image that is encoded with base64. Supported are all image formats that qt supports (enough)
- There is no real size limit. It will be automatically scaled down to max 2000px width or height according to aspect ratio
- It's possible to scale down through a new "scale" property if developer wants that.
- Test were successfull until 3MP pictues, 4k+ closes the websocket on browser side, so 2k is a decent value
- Adds a new image streaming feature from browser (tabs/applications/complete desktop as target). This works just if used with HTTPS PR#612 AND with a recent version of Firefox/Chrome
2019-08-21 16:10:35 +02:00

56 lines
847 B
JSON

{
"type":"object",
"required":true,
"properties":{
"command": {
"type" : "string",
"required" : true,
"enum" : ["image"]
},
"tan" : {
"type" : "integer"
},
"priority": {
"type": "integer",
"minimum" : 1,
"maximum" : 253,
"required": true
},
"origin": {
"type": "string",
"minLength" : 4,
"maxLength" : 20,
"required": false
},
"duration": {
"type": "integer",
"required": false
},
"imagewidth": {
"type" : "integer",
"minimum": 0
},
"imageheight": {
"type" : "integer",
"minimum": 0
},
"imagedata": {
"type": "string",
"required": true
},
"format": {
"type": "string",
"enum" : ["auto"]
},
"scale": {
"type": "integer",
"minimum" : 25,
"maximum" : 2000
},
"name": {
"type": "string"
}
},
"additionalProperties": false
}