썸네일 적용
parent
5512d90a9e
commit
5d9cec9d6b
|
|
@ -9,7 +9,7 @@ import ContentCardSocialActions from '../../components/ContentCardSocialActions'
|
||||||
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
||||||
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
||||||
|
|
||||||
const VideoPreviewCard: React.FC<{ src: string; className?: string }> = ({ src, className }) => {
|
const VideoPreviewCard: React.FC<{ src: string; poster?: string; className?: string }> = ({ src, poster, className }) => {
|
||||||
const videoRef = useRef<HTMLVideoElement>(null);
|
const videoRef = useRef<HTMLVideoElement>(null);
|
||||||
const isPlayingRef = useRef(false);
|
const isPlayingRef = useRef(false);
|
||||||
const pendingPlayRef = useRef(false);
|
const pendingPlayRef = useRef(false);
|
||||||
|
|
@ -75,6 +75,7 @@ const VideoPreviewCard: React.FC<{ src: string; className?: string }> = ({ src,
|
||||||
<video
|
<video
|
||||||
ref={videoRef}
|
ref={videoRef}
|
||||||
src={src}
|
src={src}
|
||||||
|
poster={poster}
|
||||||
className={className}
|
className={className}
|
||||||
muted
|
muted
|
||||||
playsInline
|
playsInline
|
||||||
|
|
@ -251,6 +252,7 @@ const MyContentsPage: React.FC<MyContentsPageProps> = ({ onNavigate }) => {
|
||||||
{video.result_movie_url ? (
|
{video.result_movie_url ? (
|
||||||
<VideoPreviewCard
|
<VideoPreviewCard
|
||||||
src={video.result_movie_url}
|
src={video.result_movie_url}
|
||||||
|
poster={video.thumbnail_url ?? undefined}
|
||||||
className="content-video-preview"
|
className="content-video-preview"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue