[SHOPTIME-3508] Featured Brand / Live / Live 에 포커스가 있는 상태에서 하방향 입력 시 화면이 출렁이는 현상
원인 : Video loading 이 늦어지면서 timeout 이벤트가 ui thread에 밀려 동작함. 대책 : 하단 아이템으로 포커스 변경시 video item 에 포커스 주는 타이머 정지
This commit is contained in:
@@ -23,6 +23,7 @@ import { popPanel, pushPanel, updatePanel } from "./panelActions";
|
||||
let startVideoTimer = null;
|
||||
//start modal mode
|
||||
//start Full -> modal mode
|
||||
let startVideoFocusTimer = null;
|
||||
export const startVideoPlayer =
|
||||
({ modal, modalContainerId, modalClassName, spotlightDisable, ...rest }) =>
|
||||
(dispatch, getState) => {
|
||||
@@ -48,7 +49,7 @@ export const startVideoPlayer =
|
||||
);
|
||||
if (modal && modalContainerId && !spotlightDisable) {
|
||||
Spotlight.setPointerMode(false);
|
||||
setTimeout(() => {
|
||||
startVideoFocusTimer = setTimeout(() => {
|
||||
Spotlight.focus(modalContainerId);
|
||||
}, 0);
|
||||
}
|
||||
@@ -56,11 +57,11 @@ export const startVideoPlayer =
|
||||
export const finishVideoPreview = () => (dispatch, getState) => {
|
||||
const panels = getState().panels.panels;
|
||||
const topPanel = panels[panels.length - 1];
|
||||
if (
|
||||
topPanel &&
|
||||
topPanel.name === panel_names.PLAYER_PANEL &&
|
||||
topPanel.panelInfo.modal
|
||||
) {
|
||||
if (topPanel && topPanel.name === panel_names.PLAYER_PANEL && topPanel.panelInfo.modal) {
|
||||
if (startVideoFocusTimer) {
|
||||
clearTimeout(startVideoFocusTimer);
|
||||
startVideoFocusTimer = null;
|
||||
}
|
||||
dispatch(popPanel());
|
||||
}
|
||||
};
|
||||
@@ -81,16 +82,7 @@ export const getChatLog =
|
||||
console.error("getChatLog onFail", error);
|
||||
};
|
||||
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.CHAT_LOG,
|
||||
{ patnrId, showId },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
TAxios(dispatch, getState, "get", URLS.CHAT_LOG, { patnrId, showId }, {}, onSuccess, onFail);
|
||||
};
|
||||
|
||||
// VOD 자막 가져오기 IF-LGSP-072
|
||||
@@ -115,21 +107,9 @@ export const getSubTitle =
|
||||
};
|
||||
|
||||
if (!getState().play.subTitleBlobs[showSubtitleUrl]) {
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.SUBTITLE,
|
||||
{ showSubtitleUrl },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
TAxios(dispatch, getState, "get", URLS.SUBTITLE, { showSubtitleUrl }, {}, onSuccess, onFail);
|
||||
} else {
|
||||
console.log(
|
||||
"playActions getSubTitle no Nothing it's exist",
|
||||
showSubtitleUrl
|
||||
);
|
||||
console.log("playActions getSubTitle no Nothing it's exist", showSubtitleUrl);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user