diff --git a/client/src/components/hls-preview-thumbnail.tsx b/client/src/components/hls-preview-thumbnail.tsx index 2054801..6798471 100644 --- a/client/src/components/hls-preview-thumbnail.tsx +++ b/client/src/components/hls-preview-thumbnail.tsx @@ -192,8 +192,24 @@ export default function HLSPreviewThumbnail({ video, onClick, className = "" }: alt={video.title} className="w-full h-full object-cover transition-all duration-300 group-hover:scale-105" data-testid={`img-hls-preview-${video.id}`} + onError={(e) => { + const target = e.target as HTMLImageElement; + target.style.display = 'none'; + // Show fallback background + if (target.parentElement) { + target.parentElement.style.background = 'linear-gradient(45deg, #374151, #4b5563)'; + } + }} /> + {/* Fallback for missing thumbnails */} +
+
+ +

Video Preview

+
+
+ {/* Overlay with play button */}
{/* Central Play/Pause Button */} - {!isPlaying && showControls && ( + {showControls && (
)} @@ -645,30 +648,33 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps)
-
-

- {video.title} -

-
- - {formatViews(video.views)} - - - {formatDate(video.createdAt)} - - - {formatDuration(video.duration)} - + {/* Video info - only show when not playing or when controls are visible */} + {(!isPlaying || showControls) && ( +
+

+ {video.title} +

+
+ + {formatViews(video.views)} + + + {formatDate(video.createdAt)} + + + {formatDuration(video.duration)} + +
+ {video.description && ( +

+ {video.description} +

+ )}
- {video.description && ( -

- {video.description} -

- )} -
+ )}
{/* Video Edit Modal */}