mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
json-rpc - origin, ui update (#407)
* try ace * . * update * ... * update * update * test * - * update * fix * . * Revert "." This reverts commit631c30f8c0
. * Revert "fix" This reverts commitbe3dbc9cbd
. * Revert "update" This reverts commit50fc89e800
. * Revert "-" This reverts commit8a6c1fdab3
. * Revert "test" This reverts commit50b3641490
. * update schema * update ui * flags * adjustments
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
// global vars
|
||||
var webPrio = 1;
|
||||
var webOrigin = "Web Configuration";
|
||||
var showOptHelp;
|
||||
var currentVersion;
|
||||
var latestVersion;
|
||||
@@ -217,14 +218,34 @@ function requestPriorityClear(prio)
|
||||
sendToHyperion("clear", "", '"priority":'+prio+'');
|
||||
}
|
||||
|
||||
function requestPlayEffect(effectName)
|
||||
function requestPlayEffect(effectName, duration)
|
||||
{
|
||||
sendToHyperion("effect", "", '"effect":{"name":"'+effectName+'"},"priority":'+webPrio+'');
|
||||
if(typeof duration === "undefined" || duration < 0)
|
||||
duration = 0;
|
||||
else
|
||||
duration *= 1000;
|
||||
|
||||
sendToHyperion("effect", "", '"effect":{"name":"'+effectName+'"},"priority":'+webPrio+',"duration":'+duration+',"origin":"'+webOrigin+'"');
|
||||
}
|
||||
|
||||
function requestSetColor(r,g,b)
|
||||
function requestSetColor(r,g,b,duration)
|
||||
{
|
||||
sendToHyperion("color", "", '"color":['+r+','+g+','+b+'], "priority":'+webPrio+'');
|
||||
if(typeof duration === "undefined" || duration < 0)
|
||||
duration = 0;
|
||||
else
|
||||
duration *= 1000;
|
||||
|
||||
sendToHyperion("color", "", '"color":['+r+','+g+','+b+'], "priority":'+webPrio+',"duration":'+duration+',"origin":"'+webOrigin+'"');
|
||||
}
|
||||
|
||||
function requestSetImage(data,width,height,duration)
|
||||
{
|
||||
if(typeof duration === "undefined" || duration < 0)
|
||||
duration = 0;
|
||||
else
|
||||
duration *= 1000;
|
||||
|
||||
sendToHyperion("image", "", '"imagedata":"'+data+'", "imagewidth":'+width+',"imageheight":'+height+', "priority":'+webPrio+',"duration":'+duration+'');
|
||||
}
|
||||
|
||||
function requestSetComponentState(comp, state)
|
||||
|
Reference in New Issue
Block a user