mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 13:58:20 +00:00
fix(studio): use object-contain for thumbnails so portrait videos display correctly
object-cover was cropping 9:16 portrait videos to a narrow slice inside the fixed landscape 80x45px thumbnail cells. object-contain shows the full frame with neutral-background letterboxing. Applies to Renders tab, Compositions tab, Assets tab, and timeline clip strip thumbnails.
This commit is contained in:
@@ -162,7 +162,7 @@ function CompCard({
|
||||
src={thumbnailUrl}
|
||||
alt={name}
|
||||
loading="lazy"
|
||||
className="w-full h-full object-cover"
|
||||
className="w-full h-full object-contain"
|
||||
onError={(e) => {
|
||||
(e.target as HTMLImageElement).style.display = "none";
|
||||
}}
|
||||
|
||||
@@ -50,5 +50,5 @@ export function VideoFrameThumbnail({ src }: { src: string }) {
|
||||
return <div className="w-full h-full bg-neutral-800 animate-pulse" />;
|
||||
}
|
||||
|
||||
return <img src={frame} alt="" draggable={false} className="w-full h-full object-cover" />;
|
||||
return <img src={frame} alt="" draggable={false} className="w-full h-full object-contain" />;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
|
||||
onLoad={(e) => {
|
||||
(e.target as HTMLImageElement).style.opacity = "1";
|
||||
}}
|
||||
className="absolute inset-0 w-full h-full object-cover"
|
||||
className="absolute inset-0 w-full h-full object-contain"
|
||||
style={{ opacity: 0, transition: "opacity 200ms ease-out" }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user