From b64d8299d8025f4fbb12de5380ad2d58210b6d5c Mon Sep 17 00:00:00 2001 From: dongyoungKo Date: Thu, 20 Mar 2025 17:12:54 +0900 Subject: [PATCH] =?UTF-8?q?[SHOPTIME-3737]=20Home=20/=20Top=20/=20Live=20?= =?UTF-8?q?=EB=8F=99=EC=98=81=EC=83=81=20=EC=98=A4=EB=A5=98=20=EC=8B=9C=20?= =?UTF-8?q?=EC=9E=AC=EC=8B=9C=EC=9E=91=20=EC=95=88=EB=90=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [수정사항] videoError 발생 시 currentPlayingUrl을 초기화 시킨 후 broadcast가 변경되는 타이밍에 다시 videoUrl로 변경하여 reload 시킴 --- .../src/actions/commonActions.js | 2 +- .../src/views/PlayerPanel/PlayerPanel.jsx | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/com.twin.app.shoptime/src/actions/commonActions.js b/com.twin.app.shoptime/src/actions/commonActions.js index 57d8cafe..87ff14a4 100644 --- a/com.twin.app.shoptime/src/actions/commonActions.js +++ b/com.twin.app.shoptime/src/actions/commonActions.js @@ -379,7 +379,7 @@ export const sendBroadCast = broadcastTimer = setTimeout(() => { //clear after 500ms dispatch(changeBroadcastEvent({})); - }, 20000); + }, 1000); }; export const requestLiveSubtitle = diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 44953191..fd3d5463 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -890,16 +890,6 @@ const PlayerPanel = ({ ] ); - useEffect(() => { - if (broadcast.type === "videoError") { - //setShowVideoErrorComponent(true); - // - //call false onBlur event - //setShowVideoErrorComponent(false); - } else { - } - }, [broadcast]); - useEffect(() => { //todo if(modal) return () => { @@ -1500,8 +1490,12 @@ const PlayerPanel = ({ const currentPlayingUrl = useMemo(() => { // return "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4"; + + if (broadcast.type === "videoError") { + return ""; + } return playListInfo && playListInfo[selectedIndex]?.showUrl; - }, [playListInfo, selectedIndex]); + }, [playListInfo, selectedIndex, broadcast]); const isYoutube = useMemo(() => { if (currentPlayingUrl && currentPlayingUrl.includes("youtu")) { @@ -1530,7 +1524,7 @@ const PlayerPanel = ({ return false; } return true; - }, [currentPlayingUrl, currentSubtitleUrl, currentSubtitleBlob]); + }, [currentPlayingUrl, currentSubtitleUrl, currentSubtitleBlob, broadcast]); const chatVisible = useMemo(() => { if (