From fec9919221e4bdec260e3fc4e8bf902518921a2a Mon Sep 17 00:00:00 2001 From: optrader Date: Wed, 19 Nov 2025 06:12:04 +0900 Subject: [PATCH] [251119] fix: VideoPlayer - focus move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 11. 19. 06:12:03 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 4๊ฐœ โ€ข ์ถ”๊ฐ€: +45์ค„ โ€ข ์‚ญ์ œ: -5์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข UI ์ปดํฌ๋„ŒํŠธ ์•„ํ‚คํ…์ฒ˜ ๊ฐœ์„  โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  --- .../src/components/VideoPlayer/VideoPlayer.js | 19 ++++++++++++- .../PlayerOverlay/PlayerOverlayContents.jsx | 28 +++++++++++++++++-- .../PlayerTabContents/v2/LiveChannelNext.jsx | 2 +- .../PlayerTabContents/v2/TabContainer.v2.jsx | 1 + 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js index 30b376f1..c03e58ad 100644 --- a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js +++ b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js @@ -2101,7 +2101,24 @@ const VideoPlayerBase = class extends React.Component { } else if (is('down', keyCode)) { Spotlight.setPointerMode(false); - if (Spotlight.focus(this.mediaControlsSpotlightId)) { + // TabContainerV2์˜ tabIndex=2์ผ ๋•Œ ๋ฒ„ํŠผ๋“ค๋กœ ํฌ์ปค์Šค ์ด๋™ + if (this.props.tabContainerVersion === 2 && this.props.tabIndexV2 === 2) { + let focusSuccessful = false; + + // ๋จผ์ € LiveChannelNext ๋ฒ„ํŠผ์œผ๋กœ ์‹œ๋„ + if (Spotlight.focus('live-channel-next-button')) { + focusSuccessful = true; + } + // ์‹คํŒจํ•˜๋ฉด ShopNowButton์œผ๋กœ ์‹œ๋„ + else if (Spotlight.focus('below-tab-shop-now-button')) { + focusSuccessful = true; + } + + if (focusSuccessful) { + preventDefault(ev); + stopImmediate(ev); + } + } else if (Spotlight.focus(this.mediaControlsSpotlightId)) { preventDefault(ev); stopImmediate(ev); } 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 d3ea63e5..36052be0 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx @@ -112,9 +112,31 @@ function PlayerOverlayContents({ [type] ); - const onSpotlightMoveSubtitleButton = useCallback(() => { - return Spotlight.focus('player-subtitlebutton'); - }, []); + const onSpotlightMoveSubtitleButton = useCallback( + () => { + // TabContainerV2์˜ tabIndex=2์ผ ๋•Œ TabContainerV2 ๋ฒ„ํŠผ๋“ค๋กœ ํฌ์ปค์Šค ์ด๋™ + if (tabContainerVersion === 2 && tabIndexV2 === 2) { + let focusSuccessful = false; + + // ๋จผ์ € LiveChannelNext ๋ฒ„ํŠผ์œผ๋กœ ์‹œ๋„ + if (Spotlight.focus('live-channel-next-button')) { + focusSuccessful = true; + } + // ์‹คํŒจํ•˜๋ฉด ShopNowButton์œผ๋กœ ์‹œ๋„ + else if (Spotlight.focus('below-tab-shop-now-button')) { + focusSuccessful = true; + } + + if (focusSuccessful) { + return; + } + } + + // ๊ธฐ๋ณธ ๋™์ž‘: ์ž๋ง‰ ๋ฒ„ํŠผ์œผ๋กœ ํฌ์ปค์Šค + return Spotlight.focus('player-subtitlebutton'); + }, + [tabContainerVersion, tabIndexV2] + ); const onSpotlightMoveSlider = useCallback( (e) => { diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx index a309a304..417e011a 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx @@ -18,7 +18,7 @@ export default function LiveChannelNext({ programName = 'Sandal Black...', backgroundColor = 'linear-gradient(180deg, #284998 0%, #06B0EE 100%)', onClick, - spotlightId = 'live-channel-button', + spotlightId = 'live-channel-next-button', }) { const handleSpotlightUp = (e) => { e.stopPropagation(); diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx index 0c8bdfb0..c038f27b 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx @@ -278,6 +278,7 @@ export default function TabContainerV2({ 'linear-gradient(180deg, #284998 0%, #06B0EE 100%)' } onClick={onLiveNext} + spotlightId="live-channel-next-button" />