From e3b612433cb670e25edc5f87b782249883e40252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Fri, 15 May 2026 13:51:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D1=83=20=D0=B2=20vMi?= =?UTF-8?q?x=20=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/script.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/static/script.js b/static/script.js index 3c70ce1..7f0f282 100644 --- a/static/script.js +++ b/static/script.js @@ -353,6 +353,17 @@ function startTimer() { saveMatchState(); } +async function triggerVmixExtraTimeAction(minutes, half) { + const title = "ДОБАВЛЕННОЕ ВРЕМЯ ДЛЯ ВЕРХНЕГО СЧЕТА" + + const commands = [ + vmixCmd(`Function=SetText&Input=${encodeURIComponent(title)}&SelectedName=Добавленное.Text&Value=+${minutes}`), + vmixCmd(`Function=PreviewInput&Input=${encodeURIComponent(title)}`) + ]; + + await sendDirectVmixCommands(commands); +} + function applyExtraTime() { const input = document.getElementById("extraTimeMinutes"); const value = Math.max(0, Number(input ? input.value : 0)); @@ -371,6 +382,7 @@ function applyExtraTime() { `Добавлено ${value} мин. к 1-му тайму`, matchClockSeconds ); + triggerVmixExtraTimeAction(value, "first"); } else if (currentPeriod === "2H" || currentPeriod === "FT") { extraTimeMinutes.second = value; updatePeriodBadge(`2-й тайм +${value}`); @@ -380,6 +392,7 @@ function applyExtraTime() { `Добавлено ${value} мин. ко 2-му тайму`, matchClockSeconds ); + triggerVmixExtraTimeAction(value, "second"); } saveMatchState();