From 76e33aa6bb8a64dabfb967d5d5a36b3c608acf76 Mon Sep 17 00:00:00 2001 From: otya Date: Mon, 17 Oct 2022 19:29:21 +0900 Subject: [PATCH] =?UTF-8?q?1=E5=88=86=E9=96=93=E7=84=A1=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E3=81=A7=E3=81=82=E3=82=8C=E3=81=B0=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E4=B8=AD=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E6=B6=88=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/src/TVTDataBroadcastingWV2.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/browser/src/TVTDataBroadcastingWV2.ts b/browser/src/TVTDataBroadcastingWV2.ts index 0807568..da91013 100644 --- a/browser/src/TVTDataBroadcastingWV2.ts +++ b/browser/src/TVTDataBroadcastingWV2.ts @@ -434,6 +434,7 @@ function onMessage(msg: ResponseMessage) { if (!oneSegLaunched) { browserElement.style.visibility = "hidden"; } + remoteControlStatusContainer.style.visibility = "visible"; } postMessage({ type: "serviceInfo", @@ -504,7 +505,15 @@ type ToWebViewMessage = { type: "launchOneSeg", }; +// 1分間無操作であればデータ取得中の表示を消す +let remoteControlStatusTimeoutMillis = 60 * 1000; +let remoteControlStatusTimeout = Number.MAX_VALUE; + function onWebViewMessage(data: ToWebViewMessage, reply: (data: FromWebViewMessage) => void) { + if (!cProfile && data.type !== "key" && performance.now() >= remoteControlStatusTimeout) { + remoteControlStatusContainer.style.visibility = "hidden"; + remoteControlStatusTimeout = Number.MAX_VALUE; + } if (data.type === "stream") { if (!oneSegLaunched && cProfile) { return; @@ -531,6 +540,7 @@ function onWebViewMessage(data: ToWebViewMessage, reply: (data: FromWebViewMessa remoteControlStatusContainer.style.visibility = "visible"; bmlBrowser.content.processKeyDown(data.keyCode); bmlBrowser.content.processKeyUp(data.keyCode); + remoteControlStatusTimeout = performance.now() + remoteControlStatusTimeoutMillis; } else if (data.type === "caption") { if (data.enable) { if (data.showIndicator) {