[SHOPTIME-3737] Home / Top / Live 동영상 오류 시 재시작 안됨
[수정사항] videoError 발생 시 currentPlayingUrl을 초기화 시킨 후 broadcast가 변경되는 타이밍에 다시 videoUrl로 변경하여 reload 시킴
This commit is contained in:
@@ -379,7 +379,7 @@ export const sendBroadCast =
|
||||
broadcastTimer = setTimeout(() => {
|
||||
//clear after 500ms
|
||||
dispatch(changeBroadcastEvent({}));
|
||||
}, 20000);
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
export const requestLiveSubtitle =
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user