From 1f67387eb4fc7cbb69ff1a86e9025ea4005e00f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=A0=EB=8F=99=EC=98=81?= Date: Fri, 12 Jul 2024 14:56:29 +0900 Subject: [PATCH] =?UTF-8?q?[PlayerPanel]=20disclaimer=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EC=8B=9C=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/PlayerPanel/PlayerPanel.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 7c792167..b9bcc01a 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -139,7 +139,7 @@ const YOUTUBECONFIG = { cc_lang_pref: "en", cc_load_policy: 0, }, -} +}; const PlayerPanel = ({ isTabActivated, @@ -940,9 +940,9 @@ const PlayerPanel = ({ return; } - if(isYoutube){ + if (isYoutube) { //do caption action on VideoPlayer(componentDidUpdate) - }else{ + } else { if (mediaId && captionEnable && isSubtitleActive && !panelInfo?.modal) { dispatch(requestLiveSubtitle({ mediaId, enable: true })); } else { @@ -1167,8 +1167,10 @@ const PlayerPanel = ({ const newSmallestOffsetHourIndex = shopNowInfo.findIndex( (video) => video.offsetHour === newSmallestOffsetHour.toString() ); - - return newSmallestOffsetHourIndex - 1; + if (newSmallestOffsetHourIndex >= 1) { + return newSmallestOffsetHourIndex - 1; + } + return newSmallestOffsetHourIndex; } }, [shopNowInfo, currentTime]); @@ -1266,8 +1268,8 @@ const PlayerPanel = ({ }; } else { return { - youtube: YOUTUBECONFIG - } + youtube: YOUTUBECONFIG, + }; } }, [currentSubtitleBlob, isSubtitleActive]);