build 118 - оверлеи
This commit is contained in:
@@ -277,7 +277,7 @@ class VmixAgentHub:
|
||||
text = re.sub(r"\s+", "", str(function_name or ""))
|
||||
if text.lower() == "overlayinputalloff":
|
||||
return ("all", "off")
|
||||
match = re.search(r"OverlayInput([1-4])(In|Out|Off)?", text, flags=re.IGNORECASE)
|
||||
match = re.search(r"OverlayInput([1-8])(In|Out|Off)?", text, flags=re.IGNORECASE)
|
||||
if not match:
|
||||
return None
|
||||
raw = str(match.group(2) or "toggle").lower()
|
||||
@@ -333,7 +333,7 @@ class VmixAgentHub:
|
||||
|
||||
def _runtime_overlay_payload(self, device_id: str) -> dict[str, Any]:
|
||||
source = self._runtime_overlay_state.get(device_id, {})
|
||||
overlays = {str(layer): dict(value) for layer, value in source.items() if str(layer) in {"1", "2", "3", "4"}}
|
||||
overlays = {str(layer): dict(value) for layer, value in source.items() if str(layer) in {"1", "2", "3", "4", "5", "6", "7", "8"}}
|
||||
authoritative = bool(getattr(self, "_runtime_overlay_authoritative", {}).get(device_id, False))
|
||||
observed = str(getattr(self, "_runtime_overlay_observed_at", {}).get(device_id) or "")
|
||||
return {
|
||||
@@ -697,7 +697,7 @@ class VmixAgentHub:
|
||||
async def receive_overlay_state(self, device_id: str, message: dict[str, Any]) -> None:
|
||||
raw_overlays = message.get("overlays") if isinstance(message.get("overlays"), dict) else {}
|
||||
next_state: dict[str, dict[str, str]] = {}
|
||||
for layer in ("1", "2", "3", "4"):
|
||||
for layer in ("1", "2", "3", "4", "5", "6", "7", "8"):
|
||||
raw = raw_overlays.get(layer)
|
||||
if raw is None:
|
||||
raw = raw_overlays.get(int(layer))
|
||||
|
||||
Reference in New Issue
Block a user