diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js
index 8e0ae522..6ec52ce9 100644
--- a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js
+++ b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js
@@ -723,7 +723,7 @@ const VideoPlayerBase = class extends React.Component {
static contextType = FloatingLayerContext;
static defaultProps = {
- // autoCloseTimeout: 5000,
+ autoCloseTimeout: 10000,
feedbackHideDelay: 3000,
initialJumpDelay: 400,
jumpBy: 30,
@@ -2067,6 +2067,9 @@ const VideoPlayerBase = class extends React.Component {
thumbnailUrl,
type,
isYoutube,
+ sideContentsVisible,
+ setSideContentsVisible,
+
...mediaProps
} = this.props;
@@ -2187,6 +2190,8 @@ const VideoPlayerBase = class extends React.Component {
panelInfo={panelInfo}
setSelectedIndex={setSelectedIndex}
setIsSubtitleActive={setIsSubtitleActive}
+ sideContentsVisible={sideContentsVisible}
+ setSideContentsVisible={setSideContentsVisible}
type={type}
/>
diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx
index 8b686d8c..887b8348 100644
--- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx
+++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx
@@ -1,22 +1,19 @@
-import React, {
- useCallback,
- useEffect,
- useMemo,
-} from 'react';
+import React, { useCallback, useEffect, useMemo } from "react";
-import { useDispatch } from 'react-redux';
+import { useDispatch } from "react-redux";
-import Spotlight from '@enact/spotlight';
-import SpotlightContainerDecorator
- from '@enact/spotlight/SpotlightContainerDecorator';
-import Spottable from '@enact/spotlight/Spottable';
-import Marquee from '@enact/ui/Marquee';
+import Spotlight from "@enact/spotlight";
+import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
+import Spottable from "@enact/spotlight/Spottable";
+import Marquee from "@enact/ui/Marquee";
-import { updatePanel } from '../../../actions/panelActions';
-import { panel_names } from '../../../utils/Config';
-import { $L } from '../../../utils/helperMethods';
-import { SpotlightIds } from '../../../utils/SpotlightIds';
-import css from './PlayerOverlayContents.module.less';
+import { updatePanel } from "../../../actions/panelActions";
+import { panel_names } from "../../../utils/Config";
+import { $L } from "../../../utils/helperMethods";
+import { SpotlightIds } from "../../../utils/SpotlightIds";
+import PlayerTabButton from "../PlayerTabContents/TabButton/PlayerTabButton";
+import TabContainer from "../PlayerTabContents/TabContaienr";
+import css from "./PlayerOverlayContents.module.less";
const SpottableBtn = Spottable("button");
@@ -32,6 +29,8 @@ export default function PlayerOverlayContents({
onClick,
setSelectedIndex,
setIsSubtitleActive,
+ sideContentsVisible,
+ setSideContentsVisible,
type,
}) {
const dispatch = useDispatch();
@@ -42,7 +41,10 @@ export default function PlayerOverlayContents({
}
};
- const handleSubtitleOnClick = () => {
+ const handleSubtitleOnClick = (e) => {
+ // e.stopPropagation();
+ // e.preventDefault();
+
setIsSubtitleActive((prev) => !prev);
};
@@ -124,6 +126,16 @@ export default function PlayerOverlayContents({
},
[panelInfo]
);
+ const currentSideButtonStatus = useMemo(() => {
+ if (
+ panelInfo?.shptmBanrTpNm !== "MEDIA" &&
+ !panelInfo?.modal &&
+ !sideContentsVisible
+ ) {
+ return true;
+ }
+ return false;
+ }, [panelInfo, sideContentsVisible]);
return (
<>
@@ -151,6 +163,14 @@ export default function PlayerOverlayContents({
onSpotlightRight={onSpotlightMoveSlider}
/>
+
+ {currentSideButtonStatus && (
+
+ )}
+
state.panels.panels);
const chatData = useSelector((state) => state.play.chatData);
const showDetailInfo = useSelector((state) => state.main.showDetailInfo);
@@ -149,10 +150,10 @@ const PlayerPanel = ({
);
const autoCloseVideoOverlay = useMemo(() => {
- if (!sideOpen && panelInfo.modal === false) {
- return 3000;
+ if (!sideContentsVisible && panelInfo.modal === false) {
+ return 10000;
}
- }, [sideOpen, panelInfo]);
+ }, [sideContentsVisible, panelInfo]);
const mediainfoHandler = useCallback(
(ev) => {
@@ -190,7 +191,7 @@ const PlayerPanel = ({
window.addEventListener("click", handleAction);
window.addEventListener("keydown", handleAction);
- sideCotnentsTimer = setTimeout(() => setSideOpen(false), 10000);
+ sideCotnentsTimer = setTimeout(() => setSideContentsVisible(false), 10000);
return () => {
window.removeEventListener("click", handleAction);
@@ -306,12 +307,6 @@ const PlayerPanel = ({
}
}, [isActive]);
- // useEffect(() => {
- // if (!panelInfo.modal) {
- // Spotlight.focus("videoPlayer");
- // }
- // }, [panelInfo.modal]);
-
useEffect(() => {
if (panelInfo.modal && panelInfo.modalContainerId) {
const node = document.querySelector(
@@ -388,6 +383,20 @@ const PlayerPanel = ({
return true;
}, [currentPlayingUrl, currentSubtTitleUrl, currentSubtitleBlob]);
+ const chatVisible = useMemo(() => {
+ if (playListInfo && chatData && !panelInfo.modal && isChatVisible) {
+ return true;
+ }
+ return false;
+ }, [playListInfo, chatData, panelInfo.modal, isChatVisible]);
+
+ const isQRCodeVisible = useMemo(() => {
+ if (playListInfo && shopNowInfo && !panelInfo.modal) {
+ return true;
+ }
+ return false;
+ }, [playListInfo, shopNowInfo, panelInfo.modal]);
+
useEffect(() => {
if (currentSubtTitleUrl) {
dispatch(getSubTitle({ showSubtitleUrl: currentSubtTitleUrl }));
@@ -411,6 +420,27 @@ const PlayerPanel = ({
}
}, [currentSubtitleBlob, isSubtitleActive]);
+ useEffect(() => {
+ if (!panelInfo.modal) {
+ Spotlight.focus("videoPlayer");
+ }
+ }, [panelInfo.modal]);
+
+ const currentSideButtonStatus = useMemo(() => {
+ if (
+ panelInfo?.shptmBanrTpNm !== "MEDIA" &&
+ !panelInfo?.modal &&
+ sideContentsVisible
+ ) {
+ return true;
+ }
+ return false;
+ }, [panelInfo, sideContentsVisible]);
+
+ useEffect(() => {
+ Spotlight.focus("player-tab-arrow");
+ }, [sideContentsVisible]);
+
return (
{typeof window === "object" && window.PalmSystem && (
@@ -469,28 +503,24 @@ const PlayerPanel = ({
{/* Overlay Area */}
- {playListInfo && playListInfo[selectedIndex]?.orderPhnNo && (
-
- )}
- {playListInfo && shopNowInfo && !panelInfo.modal && (
+ {isQRCodeVisible && (
)}
- {playListInfo && chatData && !panelInfo.modal && (
-
- )}
- {panelInfo?.shptmBanrTpNm !== "MEDIA" && !panelInfo?.modal && (
-
+
+ {chatVisible && }
+
+ {currentSideButtonStatus && (
+
)}
- {sideOpen &&
+ {sideContentsVisible &&
panelInfo?.shptmBanrTpNm !== "MEDIA" &&
!panelInfo?.modal && (
)}
diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx
index 67eaf62e..568fe507 100644
--- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx
+++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.jsx
@@ -1,68 +1,72 @@
-import React, {
- useCallback,
- useEffect,
-} from 'react';
+import React, { useCallback, useEffect } from "react";
-import classNames from 'classnames';
+import classNames from "classnames";
-import Spotlight from '@enact/spotlight';
-import Spottable from '@enact/spotlight/Spottable';
+import Spotlight from "@enact/spotlight";
+import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
+import Spottable from "@enact/spotlight/Spottable";
-import css from './PlayerTabButton.module.less';
+import css from "./PlayerTabButton.module.less";
const SpottableComponent = Spottable("button");
-export default function PlayerTabButton({ sideOpen, setSideOpen }) {
+const Container = SpotlightContainerDecorator(
+ { enterTo: "default-element", preserveld: true },
+ "div"
+);
+export default function PlayerTabButton({
+ sideContentsVisible,
+ setSideContentsVisible,
+}) {
const handleTabOnClick = (e) => {
- e.stopPropagation();
- setSideOpen((prev) => !prev);
+ setSideContentsVisible((prev) => !prev);
};
const onSpotlightLeft = useCallback(
(e) => {
- if (!sideOpen) {
+ if (!sideContentsVisible) {
e.stopPropagation();
Spotlight.focus("videoIndicator-up-button");
}
},
- [sideOpen]
+ [sideContentsVisible]
);
const onSpotlightDown = useCallback(
(e) => {
- if (!sideOpen) {
+ if (!sideContentsVisible) {
e.stopPropagation();
Spotlight.focus("player-shrinkbutton");
}
},
- [sideOpen]
+ [sideContentsVisible]
);
const onSpotlightUp = useCallback(
(e) => {
- if (!sideOpen) {
+ if (!sideContentsVisible) {
e.stopPropagation();
Spotlight.focus("videoIndicator-up-button");
}
},
- [sideOpen]
+ [sideContentsVisible]
);
return (
-
-
+
);
}
diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.module.less b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.module.less
index 333ac733..3638f518 100644
--- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.module.less
+++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabButton/PlayerTabButton.module.less
@@ -4,7 +4,7 @@
.size(@w: 48px, @h: 144px);
text-align: center;
position: absolute;
- top: 468px;
+
z-index: 11;
> button {
.size(@w: 48px, @h: 144px);
@@ -16,6 +16,8 @@
cursor: pointer;
}
&.arrowClose {
+ top: 400px;
+ z-index: 11;
right: -2px;
> button {
&.button {
@@ -27,6 +29,7 @@
}
}
&.arrowOpen {
+ top: 468px;
right: 658px;
z-index: 11;
> button {
diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContaienr.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContaienr.jsx
index 8fc730ea..da7e23d8 100644
--- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContaienr.jsx
+++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContaienr.jsx
@@ -1,5 +1,6 @@
import React, { useCallback, useEffect, useState } from "react";
+import Spotlight from "@enact/spotlight";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import TButtonTab, {
@@ -24,6 +25,8 @@ export default function TabContainer({
shopNowInfo,
setSelectedIndex,
liveChannelInfos,
+ setSideContentsVisible,
+ setIsChatVisible,
}) {
const [tab, setTab] = useState(0);
@@ -50,7 +53,13 @@ export default function TabContainer({
listType={LIST_TYPE.small}
/>
- {tab === 0 && }
+ {tab === 0 && (
+
+ )}
{panelInfo?.shptmBanrTpNm === "VOD" && tab === 1 && (
{
- const timer = setTimeout(() => {
+ setTimeout(() => {
Spotlight.focus("liveChannel-Item-0");
});
-
- return () => clearTimeout(timer);
}, [liveInfos]);
return (
<>
diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx
index db3ba012..c16d3b53 100644
--- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx
+++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx
@@ -4,7 +4,7 @@ import { useDispatch } from "react-redux";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
-import { pushPanel } from "../../../../actions/panelActions";
+import { pushPanel, updatePanel } from "../../../../actions/panelActions";
import TItemCard, { TYPES } from "../../../../components/TItemCard/TItemCard";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import { panel_names } from "../../../../utils/Config";
@@ -15,7 +15,11 @@ const Container = SpotlightContainerDecorator(
{ enterTo: "default-element", preserveId: true },
"div"
);
-export default function ShopNowContents({ shopNowInfo }) {
+export default function ShopNowContents({
+ shopNowInfo,
+ setSideContentsVisible,
+ setIsChatVisible,
+}) {
const dispatch = useDispatch();
const [height, setHeight] = useState();
@@ -35,6 +39,8 @@ export default function ShopNowContents({ shopNowInfo }) {
shopNowInfo[index];
const handleItemClick = () => {
+ setSideContentsVisible(false);
+ setIsChatVisible(false);
dispatch(
pushPanel({
name: panel_names.DETAIL_PANEL,