From 40fff810aa0b42befea48fa888ad59f243159869 Mon Sep 17 00:00:00 2001 From: optrader Date: Mon, 24 Nov 2025 18:09:06 +0900 Subject: [PATCH] =?UTF-8?q?[251124]=20fix:=20PlayerPanel,VideoPlayer=20?= =?UTF-8?q?=EC=B5=9C=EC=A0=81=ED=99=94-4=20HLS=20=EB=B2=84=ED=8D=BC?= =?UTF-8?q?=EA=B8=B8=EC=9D=B4=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ• 컀밋 μ‹œκ°„: 2025. 11. 24. 18:09:05 πŸ“Š λ³€κ²½ 톡계: β€’ 총 파일: 3개 β€’ μΆ”κ°€: +19쀄 πŸ“ μˆ˜μ •λœ 파일: ~ com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx πŸ”§ μ£Όμš” λ³€κ²½ λ‚΄μš©: β€’ UI μ»΄ν¬λ„ŒνŠΈ μ•„ν‚€ν…μ²˜ κ°œμ„  --- .../src/components/VideoPlayer/TReactPlayer.jsx | 2 ++ .../src/components/VideoPlayer/VideoPlayer.js | 2 ++ .../src/views/PlayerPanel/PlayerPanel.jsx | 15 +++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx b/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx index eac230ac..5b730908 100644 --- a/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx +++ b/com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx @@ -158,6 +158,7 @@ export default function TReactPlayer({ // πŸ”½ [μ΅œμ ν™”] URL λ³€κ²½ λ˜λŠ” μ–Έλ§ˆμš΄νŠΈ μ‹œ 이전 λΉ„λ””μ˜€ 정리 (λ©”λͺ¨λ¦¬ λˆ„μˆ˜ λ°©μ§€) useEffect(() => { return () => { + console.log('[TReactPlayer] cleanup - start', { url }); const videoNode = playerRef.current?.getInternalPlayer(); if (videoNode) { try { @@ -178,6 +179,7 @@ export default function TReactPlayer({ console.warn('[TReactPlayer] cleanup warning:', err); } } + console.log('[TReactPlayer] cleanup - done', { url }); }; }, [url]); // βœ… URL λ³€κ²½ μ‹œμ—λ„ 정리 둜직 μ‹€ν–‰ diff --git a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js index 35ff6c22..35ab208c 100644 --- a/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js +++ b/com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js @@ -1020,6 +1020,7 @@ const VideoPlayerBase = class extends React.Component { } componentWillUnmount() { + console.log('[VideoPlayer] componentWillUnmount - start cleanup', { src: this.props?.src }); off('mousemove', this.activityDetected); if (platform.touch) { off('touchmove', this.activityDetected); @@ -1088,6 +1089,7 @@ const VideoPlayerBase = class extends React.Component { // 정리 쀑 μ—λŸ¬λŠ” λ¬΄μ‹œν•˜κ³  μ–Έλ§ˆμš΄νŠΈ μ§„ν–‰ // console.warn('[VideoPlayer] cleanup error', err); } + console.log('[VideoPlayer] componentWillUnmount - cleanup done', { src: this.props?.src }); if (this.floatingLayerController) { this.floatingLayerController.unregister(); } diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 4e179bab..b586cf4b 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -2004,12 +2004,27 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props crossOrigin: 'true', }, tracks: [{ kind: 'subtitles', src: currentSubtitleBlob, default: true }], + hlsOptions: { + // 버퍼 길이 μΆ•μ†Œλ‘œ λ©”λͺ¨λ¦¬ μ‚¬μš© μ™„ν™” + maxBufferLength: 10, + maxMaxBufferLength: 30, + liveSyncDuration: 5, + liveMaxLatencyDuration: 10, + }, }, youtube: YOUTUBECONFIG, }; } else { return { youtube: YOUTUBECONFIG, + file: { + hlsOptions: { + maxBufferLength: 10, + maxMaxBufferLength: 30, + liveSyncDuration: 5, + liveMaxLatencyDuration: 10, + }, + }, }; } }, [currentSubtitleBlob, isSubtitleActive]);