MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / updateInputSelect

Function updateInputSelect

www/js/remote.js:146–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 }
145
146 function updateInputSelect()
147 {
148 $('.sstbody').html("");
149 var prios = window.serverInfo.priorities;
150 var clearAll = false;
151
152 for (var i = 0; i < prios.length; i++)
153 {
154 var origin = prios[i].origin ? prios[i].origin : "System";
155 origin = origin.split("@");
156 var ip = origin[1];
157 origin = origin[0];
158
159 var owner = prios[i].owner;
160 var active = prios[i].active;
161 var visible = prios[i].visible;
162 var priority = prios[i].priority;
163 var compId = prios[i].componentId;
164 var duration = prios[i].duration_ms / 1000;
165 var value = "0,0,0";
166 var btn_type = "default";
167 var btn_text = $.i18n('remote_input_setsource_btn');
168 var btn_state = "";
169
170 if (compId == "GRABBER")
171 continue;
172
173 if (active)
174 btn_type = "primary";
175
176 if (priority > 254)
177 continue;
178 if (priority < 254 && (compId == "EFFECT" || compId == "COLOR" || compId == "IMAGE"))
179 clearAll = true;
180
181 if (visible)
182 {
183 btn_state = "disabled";
184 btn_type = "success";
185 btn_text = $.i18n('remote_input_sourceactiv_btn');
186 }
187
188 if (ip)
189 origin += '<br/><span class="small text-secondary">' + $.i18n('remote_input_ip') + ' ' + ip + '</span>';
190
191 if ("value" in prios[i])
192 value = prios[i].value.RGB;
193
194 switch (compId)
195 {
196 case "EFFECT":
197 owner = $.i18n('remote_effects_label_effects') + ' ' + owner;
198 break;
199 case "COLOR":
200 owner = $.i18n('remote_color_label_color') + ' ' + '<div style="width:18px; height:18px; border-radius:20px; margin-bottom:-4px; border:1px grey solid; background-color: rgb(' + value + '); display:inline-block" title="RGB: (' + value + ')"></div>';
201 break;
202 case "IMAGE":
203 owner = $.i18n('remote_effects_label_picture') + ' ' + owner;

Callers 1

remote.jsFile · 0.85

Calls 2

createRemoteTableRowFunction · 0.85
$Function · 0.50

Tested by

no test coverage detected