Skip to content

Commit ddd4044

Browse files
committed
refactor/videoPage
1 parent e58ee66 commit ddd4044

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

src/pages/main/videoPlay/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ export default function VideoPlayPage() {
4848
>
4949
영상 시청 이후 자동으로 넘어갑니다.
5050
</p>
51+
52+
<button
53+
onClick={handleVideoEnd}
54+
className="
55+
mt-[0.4rem]
56+
text-mint-700
57+
text-body-lg
58+
underline
59+
"
60+
aria-label="영상 스킵하고 다음으로 이동"
61+
>
62+
Skip
63+
</button>
5164
</div>
5265
);
5366
}

src/shared/components/main/components/video/VideoPlayer.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ export default function VideoPlayer({ src, label, onEnd }: VideoPlayerProps) {
1515
{src ? (
1616
<video
1717
key={src}
18-
src={src}
19-
autoPlay
20-
muted
21-
playsInline
22-
controls
18+
src={src.trim()}
19+
preload="auto" // 초기 버퍼링 줄임
20+
autoPlay // 페이지 진입 즉시 재생
21+
muted // iOS 자동재생 조건
22+
playsInline // 모바일 강제 전체화면 방지
23+
controls={false}
2324
onEnded={onEnd}
2425
className="w-full h-full rounded-[2rem] object-cover"
2526
aria-label={`${label} 영상`}

0 commit comments

Comments
 (0)