From 11975ab654da8062fac886cf589688008cd55b71 Mon Sep 17 00:00:00 2001 From: brindosch Date: Mon, 19 Aug 2019 15:50:11 +0200 Subject: [PATCH 1/6] 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 --- assets/webconfig/content/remote.html | 9 ++- assets/webconfig/i18n/de.json | 1 + assets/webconfig/i18n/en.json | 1 + assets/webconfig/js/content_remote.js | 25 +++++-- assets/webconfig/js/hyperion.js | 10 +-- assets/webconfig/js/ui_utils.js | 6 +- libsrc/api/JSONRPC_schema/schema-image.json | 14 +++- libsrc/api/JsonAPI.cpp | 80 ++++++++++++++++++--- libsrc/hyperion/PriorityMuxer.cpp | 2 +- 9 files changed, 121 insertions(+), 27 deletions(-) diff --git a/assets/webconfig/content/remote.html b/assets/webconfig/content/remote.html index 292fdf911..2ad894392 100644 --- a/assets/webconfig/content/remote.html +++ b/assets/webconfig/content/remote.html @@ -43,9 +43,12 @@